I just looked through the issue queue to see if anyone else had come across this as it's quite a serious problem - the only similar issue I came across was this one #1173988: View with empty wtk fields -> wrong map rendering but zzolo responded there saying he believed the issue had been fixed in dev and the OP never responded. I'm working with the latest Views code and the latest OL (2.x) code and the problem is still there. What happens is that the map_features function in the openlayers_views_style_data class iterates over the records and assigns field values as feature attributes, but it does this by accessing the original_value property of the field handler. If a particular record does not have a value at all for that field, it is getting the value from the previous record that did have one.
Patch forthcoming!
Comment | File | Size | Author |
---|---|---|---|
#1 | 1462064.ol-views-empty-fields.patch | 1.53 KB | katbailey |
Comments
Comment #1
katbailey CreditAttribution: katbailey commentedPatch attached.
Comment #2
mgiffordPatch applies against the latest dev version
$ cd /DRUPAL7/sites/all/modules/openlayers/modules/openlayers_views
$ patch views/openlayers_views_style_data.inc < 1462064.ol-views-empty-fields.patch
patching file views/openlayers_views_style_data.inc
Hunk #1 succeeded at 253 with fuzz 1 (offset -37 lines).
Comment #3
sreynen CreditAttribution: sreynen commentedThis solved the problem for me and did not appear to create any new problems.
Comment #4
zzolo CreditAttribution: zzolo commentedThanks very much, @katbailey. Committed:
http://drupalcode.org/project/openlayers.git/commit/58ad68b
Comment #6
anniegreens CreditAttribution: anniegreens commentedI am still seeing this issue in the latest dev release, even though I can verify the new code exists.
I have phone numbers being excluded and included in a subsequent address field rewrite to be shown in the 'description' of the popup; all end up having the same phone number.
I arrived here from this issue http://drupal.org/node/1377500 that specifically refers to excluded fields, so these may be two separate issues.
Comment #7
rterman CreditAttribution: rterman commentedI am having the same problem. I have body and an excluded link field, and replaced the body field with "[body]
[link}." Then I assigned the open layers "description" field to the body field and am seeing all nodes with the same link field (the link is associated with the first node rendered.
Any fix for this please?
Comment #8
rterman CreditAttribution: rterman commentedUpdate: I made the problematic field to display (i.e. unchecked the "exclude from display") and it worked!