Closed (fixed)
Project:
Geocoder
Version:
7.x-1.x-dev
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Reporter:
Created:
10 Jan 2016 at 05:09 UTC
Updated:
30 Jan 2016 at 11:04 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
jasom commentedI confirm that after dev update Google geocoder doesn't work.
URL with error: admin/structure/types/manage/contenttypename/fields/field_geofield_ad
I use Geolocation module to get lat and long from geocoder field in field field_geofield_ad.
Also important to mention: I have multilingual site. On english version (main language) is everything OK. When I switch to Czech or German version Geocoder doesn't work.
Here is the latest working dev release from November 20, 2015 10:14.
Comment #3
erwangel commentedSame here with 7.x-1.2+35-dev (2016-jan-07)
Warning : call_user_func() expects parameter 1 to be a valid callback, function 'geocoder_google_field' not found or invalid function name dans geocoder_widget_get_field_value() (line 297 of /path-to/sites/all/modules/geocoder/geocoder.widget.inc).
Comment #4
jasom commentedHere's the latest working DEV.
Comment #5
simon georges commented@Pol, since you've done the majority of the recent commits, does it remind you of something?
Comment #6
jasom commented- Who broke the module? Who was that?!
- Pol! He did it!
:)
Comment #7
plazik commented@jasom thanks for this version.
I've also had to run
drush rrto make it works.Because this breaks module functionality I've marked it as "Critical".
Comment #8
polHi all,
First, this is the development channel of the module, so, you might expect things to break.
Second, I'm very sorry for this, I will fix what I broke for sure.
Third, the function is still in the module, I need to figure out why it's not more available.
I'll fix this for today I think.
Comment #9
rudiedirkx commentedAdding
before line 145 fixes it for me, but it seems very unlikely someone removed something like that... The fix does make sense though, because the handler has to include itself, kinda.
Patch attached for just that.
Comment #10
rudiedirkx commentedIt looks like 44c79b5 broke it, which makes sense, because caching it, means the file isn't included anymore. I think #9 fixes it decently, but there might be a ctools include function to do that correctly.
Comment #11
rudiedirkx commentedActually, that should be a
require_onceinstead of aninclude.Comment #12
polShouldn't we use ctools_plugin_load_includes() ?
Comment #13
rudiedirkx commentedNot good enough. Needs more inclusion, for all callbacks.
Now with handler include helper. Last time.
The ctools function looks... HUGE for just including 1 file. I don't know what ctools expects. Maybe there's more important logic in
ctools_plugin_load_includes(), but it seems excessive.Comment #14
rudiedirkx commentedAnd what is this?!?
Should that make the string
because it's missing a few quotes then. Or is it supposed to make
because that's concatting arrays into strings...
I don't trust ctools =) never have.
Comment #15
polCTools is not perfect indeed... but it helped us a lot.
I think we should use api functions for now as much as possible, we'll have more options in Geocoder 2.x.
With ctools_plugin_load_includes(), does it works ?
Comment #16
rudiedirkx commentedI haven't tried. I didn't know it existed until now. I might tomorrow.
Comment #17
polOk, let me know if it works then, I'll commit it asap after that.
Comment #19
polHi all, I've fixed it.
Sorry for that.
In the meantime, you can have a look at Geocoder 2.x @ http://github.com/drupol/geocoder
Comment #20
rudiedirkx commentedI'm still getting this, when saving a new field (in POSTback). The URL is
/admin/config/people/accounts/fields/field_geostuffs?destinations[0]=admin/config/people/accounts/fieldsand I just confirm-saved the new field. When I go back one page, it's still broken.In
geocoder_get_handler()is apparently not enough.Error:
Comment #21
mxtJust upgraded to latest 7.x-1.x-dev.
Google geocoding is not working now, simple address are not geocoded:
And I get this warning:
Comment #23
polHi,
I've updated again, can you try and give me feedback please ?
Comment #24
rudiedirkx commentedNope. Still fails on the widget form. It's not that hard =) Line 146.
$settings_callbackis a function. It doesn't exist. #13 does that. I'm not sure if #22 did anything, I don't know howgeocoder()would be called.Comment #25
polOh I didn't see that patch!
Can you please reroll it and remove the useless require_once ?
Thanks !
Comment #26
rudiedirkx commentedNo, you're almost there! =) Just add the handler function on 1 more location (psst line 146) and we're done, I think. #22 was useful. There are 3 locations (so far) that require the explicit handler include/load, not just 2 like I thought.
Comment #27
polVoila, done.
Sorry, for the bug :(
Comment #29
rudiedirkx commentedNope.
and then a
Go home Pol, you're drunk =)
Comment #30
polShit... I think I've fixed it.
Comment #32
rudiedirkx commentedYes, I think that was it! I'm proud of you man. Time for weekend.
Comment #33
polGeez, I really needed some sleep :-)