Steps to reproduce:

  1. Setup an OpenLayers Data Overlay
  2. Add a nid field and exclude it from visualization
  3. Add a (visible) math expression field using the nid field, e.g. [nid]+1
  4. Preview the display

Expected result: you get a diffferent computed value for each different node.
Actual result: you get the same value for each node, i.e. the expected value for the last row.

This has been discovered while trying to use a math expression field to select a single value among different location fields attached to different content types (i.e. emulating an OR among them) on the assumption that only one of them is actually populated for each row:

[field_location]+[field_location_2]+[field_location_4] (latitude field)
[field_location_1]+[field_location_3]+[field_location_5] (longitude field)

Every point in the map would end having the same position (the one of the last node).

Files: 
CommentFileSizeAuthor
#6 openlayers_views-excluded-field-values-broken-1377500-6.patch1.09 KBanniegreens
PASSED: [[SimpleTest]]: [MySQL] 238 pass(es).
[ View ]
#5 openlayers_views-excluded-field-values-broken-1377500-1.patch1.09 KBanniegreens
PASSED: [[SimpleTest]]: [MySQL] 238 pass(es).
[ View ]
#1 ol_views-1377500-1.patch1.09 KBplach
PASSED: [[SimpleTest]]: [MySQL] 236 pass(es).
[ View ]

Comments

Status:Active» Needs review
StatusFileSize
new1.09 KB
PASSED: [[SimpleTest]]: [MySQL] 236 pass(es).
[ View ]

I initially rolled this against the 2.x branch but it applies cleanly on the 3.x branch too.

I can confirm that this patch applies to the git repository.

Version:7.x-3.x-dev» 7.x-2.x-dev
Status:Needs review» Needs work

Hi @plach. This patch may have fixed this, can you confirm.
https://drupal.org/node/1462064

Note that 3.x is still way up in the air.

Status:Needs work» Needs review

I tried with the lastest dev (03/25), which should include that fix with no luck. The patch still applies.

StatusFileSize
new1.09 KB
PASSED: [[SimpleTest]]: [MySQL] 238 pass(es).
[ View ]

I can confirm that the patch from http://drupal.org/node/1462064 that is included in the latest dev does not fix this issue.

Patch from #1 re-rolled for latest dev.

StatusFileSize
new1.09 KB
PASSED: [[SimpleTest]]: [MySQL] 238 pass(es).
[ View ]

Correctly named patch attached.

Thanks !

Committed to 7.x-2.x and 7.x-3.x.

Status:Needs review» Closed (fixed)