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.
Le lib GeoPHP is missing for installation.
Fatal error: Class 'geoPHP' not found in /modules/leaflet/leaflet.module on line 138
I used module geoPHP and called $geophp = geophp_load(); to load the lib.
Not the best way to bo it, but just for you to know what i run into ^^
Comments
Comment #2
acbramley CreditAttribution: acbramley commentedUpdate to latest dev release #2731917: New version of geofield uses composer for the geophp dependency, call to geophp_load() in leaflet_process_geofield() not needed
Comment #3
calbasiI can confirm this issue. And version 1.0-beta1 seems have applied patch at #2731917 (https://www.drupal.org/files/issues/leaflet-remove_geophp_load_call-2731... ) because geophp_load() is not there, nor dev version... Both versions have the same code. And both version have at line 138:
if (!($geom = geoPHP::load(isset($item['wkt']) ? $item['wkt'] : $item))) {
That crashes website.
Comment #4
calbasiMy problem could be related with deployment using git and phayes phpgeo composer dependency, which is using a .gitignore:
/vendor
what is preventing my local dev site to clone it: https://github.com/phayes/geoPHP/issues/142
Comment #5
calbasiIn my hand bug was not involved with leaflet itself but with geofield module.
And the reason is that if you install dependencies using composer, it download /vendor libraries but it also generate autoload files, at /vendor/ and /vendor/composer folders.
And, if time after, you use drush to upload drupal core, vendor folder and autoload files are overwritted by drupal core defaults. In my hand, I put there /vendor/phayes library, but I didn't realize I should update autoload stuff, specially /vendor/composer/autoload_classmap.php file.