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.
I save a new view with geofield plugin and apache blocks the page when I try to load it.
all to a member function out() on a non-object in ./sites/all/modules/geofield/modules/geofield_map/includes/geofield_map_plugin_style_map.inc on line 118
Comment | File | Size | Author |
---|---|---|---|
#24 | geofield-geometry_out_error-1451946-24.patch | 824 bytes | mariacha1 |
#13 | 1451946-geometry_out_error_2.patch | 744 bytes | nrambeck |
#11 | 1451946-geometry_out_error.patch | 873 bytes | nrambeck |
Comments
Comment #1
phayes CreditAttribution: phayes commentedCan you confirm that you have geoPHP installed and updated to the latest version by checking your status page?
Comment #2
Admdebian CreditAttribution: Admdebian commentedI have the last version of geophp... How can I check?
Comment #3
Admdebian CreditAttribution: Admdebian commentedexcuseme..that's my status report:
GeoPHP Library Installed GeoPHP 0.5 library installed at sites/all/libraries/geoPHP/geoPHP.inc
Comment #4
Brandonian CreditAttribution: Brandonian commentedThe check for whether or not the geometry exists in question on line 115 in modules/geofield_map/includes/geofield_map_plugin_style_map.inc might not be enough. I'll see if I can reproduce.
Comment #5
Brandonian CreditAttribution: Brandonian commentedAlso, are you actually using 2.x-dev, or one of the 1.x releases?
Comment #6
Admdebian CreditAttribution: Admdebian commentedI worked a lot with this project... when I have posted the bug, I was running the 7.x.2-dev as I wrote. Can I help you?
Comment #7
phayes CreditAttribution: phayes commentedHi Admdebian,
If you can, we really would appreciate you looking into this bug in the code. Please do and report back! Patches would also be appreciated.
Comment #8
kvit CreditAttribution: kvit commentedI use textfield (for address input) + geocoder (Google) + geofield + geofield map to provide maps for content nodes and for views.
Everything was fine for me with Feb-09 geoPHP library, Jan-27 Geocoder 7.x-1.x-dev and Geofield 7.x-1.0-rc1.
Today I upgraded to Feb-25 geoPHP library and Feb-27 Geocoder 7.x-1.x-dev. After that:
- I see my content nodes without map;
- I see nothing on the pages that contain views using Geofield Map format except
"Fatal error: Call to a member function out() on a non-object in .../modules/geofield/modules/geofield_map/includes/geofield_map_plugin_style_map.inc on line 118"
Upgrading Geofield from rc1 to Feb-26 7.x-1.x-dev didn't help.
Comment #9
phayes CreditAttribution: phayes commentedCan you try rolling back to the previous version of geoPHP?
Comment #10
kvit CreditAttribution: kvit commentedWith installing Geocoder 7.x-1.0-beta1 the problem disappeared.
Added:Than after 20 hours of normal work the error showed up again. It seems that it doesn't depend on the version of geoPHP, geofield or geocoder, and don't know why it appeares and disappeares.
Comment #11
nrambeck CreditAttribution: nrambeck commentedI have the exact same problem. I'm using Geocoder with Address field and my view generates the same fatal error.
Attached is a patch that fixes the problem, but I'm not sure if this fix will break in other circumstances.
In my situation this line:
Was using this actual data (not a WKT data format):
Comment #12
Brandonian CreditAttribution: Brandonian commentedGood debugging, @nrambeck. I've committed your patch to the dev branches. The next time you commit a patch to a module, can you make it relative to the module rather than the root of your Drupal install?
@kvilt, can you confirm that this fix takes care of your problem?
Comment #13
nrambeck CreditAttribution: nrambeck commentedSorry about the sloppy patch file. I was under a time crunch. Here is a better patch file in case someone needs just this fix.
Comment #14
Admdebian CreditAttribution: Admdebian commentedI don't use geocoder, I think that geocoder version can't solve the bug.
I'm glad to know someone made a patch; good work! I'll read your comments.
(Excuse me but I have no time now to work at the patch, I have problem vith views and openlayers...I think there is a new bug...)
Comment #15
kvit CreditAttribution: kvit commentedThanks for the work on the problem.
Installing Feb-29 dev of Geofield solved it for most of my views, though not all of them.
If some address input data is not accurate and can't be geocoded, the content node shows no map and it's OK. But a View containing this content still leads to Fatal error from #8. I would much prefer if erroneous addresses from content provided no points on the Geofield Map View instead of Fatal error. Otherwise any user adding not accurate address to a node can totally break views pages containing important data from other users.
Comment #16
mavdiablo CreditAttribution: mavdiablo commentedHi there,
I have the same error
sites/all/modules/geofield/modules/geofield_map/includes/geofield_map_plugin_style_map.inc on line 118
in a page view using geofield map wkt
Furthermore, in the node page can not show a map of the address field.
All this worked before the upgrade to Drupal 7.14 on May 3
Have you some suggestion?
Comment #17
Drupa1ish CreditAttribution: Drupa1ish commentedThere are no controls available on node edit page after upgrading to Drupal 7.14
Comment #18
Brandonian CreditAttribution: Brandonian commentedForgot to mark this fixed from earlier. Please reopen if anyone has the same issue.
Comment #20
Dave Cohen CreditAttribution: Dave Cohen commentedI'm seeing this problem in a view block display of type geofield map.
The code looks like this:
$geometry is null, which causes the fatal error.
$geofield[0]['rendered'] is set, but 'rendered' is the only key in $geofield[0]. There is no 'raw'.
Comment #21
mikemadison CreditAttribution: mikemadison commentedI'm still getting this issue with the most recent dev:
Fatal error: Call to a member function out() on a non-object in /drupal/sites/all/modules/geofield/modules/geofield_map/includes/geofield_map_plugin_style_map.inc on line 121
After digging a bit, it actually looks fairly easy to fix.
should be changed to
Comment #22
bmunslow CreditAttribution: bmunslow commented#21 worked for me, thanks!
Comment #23
piyuesh23 CreditAttribution: piyuesh23 commented#21 works for me as well
Comment #24
mariacha1 CreditAttribution: mariacha1 commentedHere's a patch that mimics comment #21, which also fixed the error for me.
Comment #25
eelkeblokThanks, #24 works for me.
Comment #27
Brandonian CreditAttribution: Brandonian commentedThanks for the patch, @mariacha1! Committed to 7.x-2.x
http://drupalcode.org/project/geofield.git/commit/16a0335
Comment #29
bendev CreditAttribution: bendev commentedAgainst version 7.X-1.2, this would be