Closed (fixed)
Project:
Geofield
Version:
7.x-2.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Apr 2013 at 16:52 UTC
Updated:
21 Jul 2013 at 02:11 UTC
Jump to comment: Most recent file
Comments
Comment #1
Robin_K commentedI have the same issue, it seems to be a bug with the OpenLayers configuration for the css files.
When I check the requests to the server when I click the "Find using..." button I see a 404 request for some OpenLayers css, it seems like the link to the css files is wrong.
In my case, the request URL is
.../sites/all/modules/openlayers/themes/default_dark/style.css,sites/all/modules/openlayers/themes/default_dark/style.cssFor some reason the file path for the css is appended twice.
Comment #2
Robin_K commentedI did some further debugging to see what is going wrong in the OpenLayers javascript, the css request isn't the source of the problem.
It seems like whenever the "Find using..." button is clicked a new openlayers object is created, but instead of creating a new object, GeoField takes the old object and appends the new values, resulting in an OpenLayers object containing arrays with 2 values where 1 single value should be.
I'm assuming this causes OpenLayers to fail.
Comment #3
Exploratus commentedI have the same problem. Just enbled the widget, and when I click Find using button the map disapears.
Comment #4
iztok commentedExperienced same bug.
Module versions:
Geofield 7.x-2.x-dev - 2013-Apr-07
openlayers 7.x-2.0-beta5
Comment #5
Enric Climent commentedSame bug here with profile2 and with normal content type.
Any suggestions?
Thanks
Comment #6
geigerg commentedComment #7
Dave Cohen commentedSame problem here.
Comment #8
Lemontonix commentedSame problem here
Comment #9
bbujisic commentedThis seems to be an openlayers problem.
I still did not find a solution, as I do not totally understand Openlayers, but seems I found a problem, or at least got relatively close to problem.
map.center.initial.centerpointhas a string value"0, 0". After you hit the "Find using address field" button, the value will become array of two elements: ["0, 0", "0, 0"].These changes in map object break OpenLayers.Bounds.fromString and OpenLayers.LatLon.fromString, probably other functions too. So they definitely ARE culprit.
I attached a console screenshot which illustrates my findings.
Any help from somebody who knows the process behind these map object amendments?
Comment #10
plopescHello
I've been debugging this error and finally I found that the problem was in Geofield and the way that AJAX managed the form when clicking geocoding button.
Attaching patch that fixes the problem for me.
Working with:
Regards
Comment #11
shadysamir commented#10 Works for me too. Many thanks @plopesc
Comment #12
bbujisic commented+1 for #10! Thanks Pablo!
Comment #13
Brandonian commentedThanks for the patch, @plopesc! Patch in #10 committed to 7.x-2.x.
http://drupalcode.org/project/geofield.git/commit/edd75ee