Closed (fixed)
Project:
GMap Module
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
28 Jul 2011 at 00:53 UTC
Updated:
26 May 2012 at 01:50 UTC
Jump to comment: Most recent file
Comments
Comment #1
hutch commentedDoes replacing it with urlencode() make it work properly?
Comment #2
Clive@onebrick.org commentedYes. Replacing the call with urlencode() solves the problem.
Comment #3
hutch commentedHere is a patch on current 7.x-1.x
Comment #4
damiankloip commentedI found the same problem/fix. This patch needs to be committed but I don't think it has yet? apologies if I'm wrong...
Comment #5
hutch commentedSetting this issue to 'Needs Review' for patch in #3
Comment #6
phoenix commenteddrupal_urlencode is drupal_encode_path in drupal 7.
See here on api.drupal.org (comment #1): http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_ur...
Comment #7
damiankloip commentedGood spot @phoenix. Patch in #3 is not applicable, uses php urlencode function. Just change that for drupal_encode_path instead...
Comment #8
damiankloip commentedComment #9
hutch commentedHere is a patch as per #7, I can't test at the moment, rebuilding server.
Should work...
Comment #10
damiankloip commentedLooks good to me, how wrong can a one liner go ;)
Comment #11
nclavaud commented#9 works here too
Comment #12
heavy_engineer commented#9 is fine for me too thanks.
Comment #13
calmforce commentedI added this tiny function to my module, and everything works:
function drupal_urlencode($address) {
return drupal_encode_path($address);
}
With this function present no need to patch GMap module.
Two obvious questions come to mind:
1. Without a patch (or the function that I suggest) the gmap_geocode function is useless. The change is so simple, why GMap 7.x-1.x-dev has not been fixed yet?
2. Question to Drupal core guys: why to change the API function name, so some modules have to be patched? Sounds like unnecessary change without respect to backwards compatibility...
Comment #14
haiiro.shimeji commentedpatch #9 is applied to 7.x-1.x branch. Thanks a lot!