Closed (fixed)
Project:
Leaflet
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Jun 2012 at 22:52 UTC
Updated:
2 Jul 2012 at 19:21 UTC
Jump to comment: Most recent file
Every time I go to view an entity with a leaflet field formatter on a geofield, I get this:
Fatal error: Call to undefined function geofield_load_geophp() in /var/www/ftcforreal/sites/all/modules/contrib/leaflet/leaflet.formatters.inc on line 212
I have geophp, the latest geofield, and the dev version of leaflet (tried it with alpha1 as well with the same error).
I will report back on what happens when I backport geofield!
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | leaflet-1621688-6.patch | 455 bytes | pvhee |
| #4 | fixgeofieldformatter-1621688-3.patch | 455 bytes | rerooting |
| #3 | fixgeofieldformatter-1621688-2.patch | 455 bytes | rerooting |
Comments
Comment #1
rerooting commentedHuh, kind of works if I change the functioned called in leaflet.formatters.inc from geofield_load_geophp() to load_geophp(), as this is the function called by geofield. Now I don't get the error, I just get the grey container issue, which I will now check out!
Comment #2
rerooting commentedOops! Didn't have a map selected.
It looks like changing the function as I mentioned in #1 works fine. Might want to debug this further, but it seems like a patch for this is almost unneeded given how simple it is! I can submit one anyways.
Comment #3
rerooting commentedOk I was going to change the status anyways, so might as well upload a patch.
Lev - let me know if you need any further help debugging this, but this minor fix *seems* to work for someone (me) who just started using leaflet today!
Comment #4
rerooting commentedCrap! Only I would screw up a patch that simple. geophp_load not load_geophp... yeah.. haha
Comment #5
rerooting commentedThis appears to be the commit to blame:
http://drupalcode.org/project/geofield.git/commitdiff/69189a6d128affd8bd...
Looks like this has to do with them implementing the new geophp module - thus the hook_load() on a the geophp module rather than geofield!
Comment #6
pvhee commentedAttached a patch to replace "geofield_load_geophp" with "geophp_load", which fixes the problem.
Comment #7
rerooting commentedhaha! you must not have read #4, does the exact same thing ;)
Comment #8
pvhee commentedSorry rerooting, must have missed that :) Good we're on the same line I guess!
Comment #9
rerooting commentedIts no problem! I should have been more explicit about what I was doing. Your comment alongside your patch was much more useful than my plodding about several times over! After 4 years, I'm still learning how to properly patch and use the issue queues :)
But yes, this patch was super crucial for us. We just launched our new site using a bean with a geocoded geofield from an addressfield with a leaflet formatter and a custom map. I LOVE the leaflet module. As soon as this fix is committed to the leaflet module I am going to release a feature that demonstrates how to do just that with bean, geofield, geocoder, etc. and it will include an example custom map.
Comment #10
pvhee commented#4 has been committed. Thanks rerooting!
Comment #11
rerooting commentedThanks to you as as well pvhee! I'll be sure to test the hell out of the views submodule. So excited about leaflet!