Closed (fixed)
Project:
Location
Version:
6.x-3.x-dev
Component:
Miscellaneous
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Dec 2010 at 15:40 UTC
Updated:
4 Feb 2011 at 23:30 UTC
I am currently using the dev version of location module. For some reason the autocomplete feature for location node field is not working. I'm wondering if this is an issue that someone has had. I'm not getting any errors and can't seem to track the issue down.
Comments
Comment #1
Realeiko commentedI have the same issue (Drupal 6.19 + Location 6.x-3.x-dev (2010-Sep-30)).
I've used firefox to peek arround form elements data, and I've found that #autocomplete_path value of state/province is badly build by default. In my case (default country forced to Spain, 'es' code), the value was
'/?q=location/autocomplete/e', instead of '/?q=location/autocomplete/es' (note that contry code is truncated, and this is the bug).
The cause is a incorrect declaration of the default country code in function location_locationapi(&$obj, $op, $a3 = NULL, $a4 = NULL, $a5 = NULL) in location.module:
Sorry about not providing a .diff file patch... I'm a Drupal newbie and I don't now how to do it... yet... (how embarrassing!!).
Comment #2
atomicbop commentedNice find. Worked perfectly.
Comment #3
jfox77 commentedThanks, Realeiko! Fixing the location_locationapi in location.module solved my problem!
Comment #4
rooby commentedI have committed a fix that fixes this issue as well as these two related issues:
#846604: warning: trim() expects parameter 1 to be string, array given in sites/all/modules/location/location.inc on line 498.
#990804: When "Display full province name" is selected, parts of the administrative UI become disabled
The fix was taken from bdragon's DRUPAL-7--4 branch, where he had already fixed this.
The fix checks both $a5['country']['default'] and $a5['country'] as there are times when each is valid.
http://drupal.org/cvs?commit=486596
http://drupal.org/cvs?commit=486594
http://drupal.org/cvs?commit=486600