Needs review
Project:
cck_map
Version:
5.x-3.3
Component:
Code
Priority:
Critical
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
13 Dec 2007 at 03:18 UTC
Updated:
4 Jun 2008 at 03:55 UTC
Jump to comment: Most recent file
Comments
Comment #1
B747 commentedI get this too...
Comment #2
slysie commentedI get this too, there is a JS error 'field_location' not found
Comment #3
blueflowers commentedI'm getting this as well.
Comment #4
yngvewb commentedI also got this error. Have someone found a solution?
Comment #5
sunnydeveloper commentedI believe this has come down to a browser issue? Are you all getting this error in IE only? Does it work in Firefox?
Comment #6
darrenmothersele commentedi get this too. on firefox 3 beta 3
Comment #7
setvik commentedI'm getting the same behavior in Safari 3, ie6 and ie7.
Works fine in Firefox 2 and 3rc1.
I'm using cck_map 3.3
Comment #8
setvik commentedOk, I think I tracked down the bug.
It happens if you put any spaces or underscores (the same thing really, as spaces are automatically replaced with underscores) in the name for any cck map fields you create.
HOW TO REPRODUCE:
1) Create a new cck field (with at least one space or underscore in the name: e.g. "my map", which will become "field_my_map") & attach it to a content type.
2) Use Safari 3 (probably 2 as well though i haven't tested), IE6, or IE7 and create a new node, click on the map to set a marker, and save the node.
3) view the node; the marker should no longer be set (and if you edit the node, same thing).
WHY IT'S HAPPENING:
There's some buggy string replace code in the javascript that incorrectly names the form fields for the marker points latitude and longitude.
It's supposed to replace all dashes with underscores, but only works in firefox... In other browsers, it only replaces the first dash, failing for any field with more than one underscore in the name
e.g. a cck field named "field_my_map" results in lat & lon fields whose name incorrectly starts with "field_my-map" in IE6, IE7, and Safari 3.
Attached is a patch that fixes the string replace code.