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.
Just thought i'd post this here in case anyone else had the same problem as me just now.
The geofield module which used to require the geophp module has now switched to using composer to manage the dependency.
Since the geophp module is no longer required as of that change, the call to
geophp_load();
fails in
function leaflet_process_geofield($items = array()) {
}
Composer autoloads the classes of any dependencies so we don't actually need the call to
geophp_load();
anymore.
Obviously if you aren't yet on the latest version of geofield which has made this change, then you won't need this patch and it will most likely cause your maps to stop working.
Comment | File | Size | Author |
---|---|---|---|
#9 | leaflet-remove_geophp_load_call-2731917-9.patch | 316 bytes | Patrick Ryan |
#2 | leaflet-remove_geophp_load_call-2731917-2.patch | 319 bytes | rossb89 |
Comments
Comment #2
rossb89 CreditAttribution: rossb89 at ComputerMinds commentedPatch attached
Comment #3
rossb89 CreditAttribution: rossb89 at ComputerMinds commentedComment #4
rossb89 CreditAttribution: rossb89 at ComputerMinds commentedComment #5
szeidler CreditAttribution: szeidler at Ramsalt Lab commentedI can confirm, that the code-change is working, when using the recent version of the geofield module.
Comment #6
szeidler CreditAttribution: szeidler at Ramsalt Lab commentedMoving the priority to Critical, because when setting up a new project with geofield and leaflet now, leaflet module will call for an undefined method as long as the geophp module isn't enabled.
Comment #7
szeidler CreditAttribution: szeidler at Ramsalt Lab commentedComment #8
ippy CreditAttribution: ippy commentedYep. I encountered the 500/WSOD using Leaflet 8.x-1.0-alpha1 and Geofield 8.x-1.0-alpha2 (with phayes/geophp via Composer Manager) and can confirm that the patch worked for me. Many thanks :)
Comment #9
Patrick Ryan CreditAttribution: Patrick Ryan commentedWe should probably keep this in to prevent breaking sites that haven't updated geofield. Checking to see if geophp is enabled should take care of both situations.
Comment #10
itamair CreditAttribution: itamair commented@patrick-ryan I don't think your addition is needed, and the patch is ok as it already was.
The Leaflet module haven't got any dependency from geophp and neither form geofield.
The leaflet_process_geofield function will be called just for a geofield field (it means if the geofield is installed ... ),
and the geofield module will (have to) include itself the geophp library ...
So it seems (imho) that the geophp_load() call became mostly/totally useless.
Comment #11
proweb.ua CreditAttribution: proweb.ua commented#9 works
Comment #12
-enzo- CreditAttribution: -enzo- at Anexus commentedUsing the Drupal Console project http://drupalconsole.com. You can install the module using composer in background.
Check the command
drupal module:download geofield --composer
Comment #13
acbramley CreditAttribution: acbramley commented#2 should be committed, I agree with the comments in #10
Comment #14
tobiasbComment #15
Grimreaper+1 for patch in #2
Thanks
Comment #17
pvhee CreditAttribution: pvhee at Marzee for ARTE G.E.I.E. commentedThanks for the patch, I agree with the comments in #10 and committed #1