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.
After saving a node when leaving a geofield empty, this error occurs.
Notice: Undefined index: in geoPHP::load() (line 62 of /Users/jjpost/local_sites/drupal/sites/all/modules/contrib/geophp/geoPHP/geoPHP.inc).
Exception: geoPHP could not find an adapter of type in geoPHP::load() (line 65 of /Users/jjpost/local_sites/drupal/sites/all/modules/contrib/geophp/geoPHP/geoPHP.inc).
Comment | File | Size | Author |
---|---|---|---|
#4 | 2292147-4.patch | 1.62 KB | SpadXIII |
Comments
Comment #1
jjpost CreditAttribution: jjpost commentedAttached a patch to fix the issue.
Comment #2
jjpost CreditAttribution: jjpost commentedComment #3
jjpost CreditAttribution: jjpost commentedUpdated the patch. $item['geom'] is not always an array.
Comment #4
SpadXIII CreditAttribution: SpadXIII commentedI updated patch in #3 and added my own patch to fix a similar issue with openlayers.
When saving a node and leaving the field empty, I can't edit the node anymore because of the geoPHP::load error. I fixed this in a similar way by ignoring empty item-values in the function openlayers_field_widget_form().
Comment #5
opdaviesI've tested the patch in #4. It applies cleanly to the module and fixes the issue.