Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The Openlayers Geofield sub-module uses the function openlayers_widget_geocode() as an AJAX callback for geocoding.
This function is in the Geofield module, specifically in the file geofield.widgets.openlayers.inc, along with the other old Geofield Openlayers widget code.
The recommended geofield widget code is now stored in the Openlayers Geofield module, not in Geofield itself. However, this one callback is still used from the old widget.
I propose that we move (copy and rename) this function to the Openlayers Geofield module.
Patch to come...
Comment | File | Size | Author |
---|---|---|---|
#6 | openlayers_widget_geocode_callback-2762367-6.patch | 1.49 KB | m.stenta |
| |||
#2 | openlayers_widget_geocode_callback-2762367-1.patch | 1.82 KB | m.stenta |
|
Comments
Comment #2
m.stentaComment #4
m.stenta(Maybe we should disable automated testing on this module? I don't think it's working as intended.)
Comment #5
m.stenta(Created a new issue for the testing issue: #2762377: Automated testing is broken)
Comment #6
m.stentaFurther debugging in #2755899: Geocode button doesn't work has proven that this function can be even simpler. Attached is a new patch that simply returns the geofield element, without making any changes to it within the function. Generally, Ajax callbacks should only return the element that they are replacing - and in most cases all action should be in the submit function. The logic for geocoding is already in openlayers_openlayers_use_geocoder_submit() so it does not need to be duplicated here.
Comment #8
m.stentaComment #10
PolThanks again :-)