For views that return multiple fields, the value of $col_id seems to be coming back as numeric. To this end, I've put together a patch to allow for this when pulling the value.

(Also incorporates patch from https://www.drupal.org/node/2358235)

Comments

geoffreyr created an issue. See original summary.

geoffreyr’s picture

Issue summary: View changes
dman’s picture

OK, I see what's going on there.
Yes, it was a assumption/requirement/rule that the view was to return only one column.
But only because it was tricky and out of scope to figure out why the results were shaped differently. .. which you have figured out!

This looks like a great patch to me. :-)

  • dman committed a2b99fb on 7.x-1.x authored by geoffreyr
    Issue #2801129 by geoffreyr: Views plugin: allow lookup by numeric index
    
dman’s picture

Status: Needs review » Fixed

Thanks Heaps!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.