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

spiderneo created an issue. See original summary.

acbramley’s picture

calbasi’s picture

Priority: Normal » Major
Status: Closed (duplicate) » Active

I 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.

calbasi’s picture

My 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

calbasi’s picture

Status: Active » Closed (duplicate)

In 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.