Problem/Motivation
If the map geocoder settings options are '' (default not set) the request from the geocode map 'field' to geocode is encoded as:-
http://example.com/geocoder/api/geocode?address=What%20has%20%been%20typ...
The null is being treated as the string 'null' by geocoder Drupal\geocoder\Controller\GeocoderApiEnpoints::setGeocodersOptions() which is then passed into NestedArray::mergeDeep causing it to throw an exception as it's getting the string 'null' as one of the arrays to iterate over.
Steps to reproduce
Create a geocoder configuration with the default options ''. Configure geofield to use geomap with the geocoder. With exceptions switched to be outputted the exception will be at the top of the json response from the geocoder.
Proposed resolution
Maybe not the best place, but I just in the GeocoderService::getJsGeocoderSettings switched to the empty string '' if Json::decode($map_geocoder_settings['options']) returned null.
Remaining tasks
Post patch, review.
User interface changes
n/a
API changes
n/a
Data model changes
n/a
Issue fork geofield_map-3182632
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
- 3182632-geocoder-requests-includes
changes, plain diff MR !1
Comments
Comment #2
ekes commentedOK. No patch. A fork. Good time to get used to the fork - branching that d.o is now offering :-)
Comment #3
ekes commentedComment #6
itamair commented@thanks! Committed into dev, will be part of the next release ...