Closed (fixed)
Project:
Views (for Drupal 7)
Version:
7.x-3.0-beta3
Component:
fieldapi data
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
2 May 2011 at 15:35 UTC
Updated:
3 May 2011 at 13:43 UTC
I have a node type "Photo" with a term reference "Trip", and a view that selects this field (as well as various others). In the replacement patterns, the View UI lists
[field_trip] == Content: Trip
[field_trip-tid] == Raw tid
Using [field_trip] in "rewrite this as a link" works fine, but [field_trip-tid] does not. I am not familiar enough with the Views code to be able to fix this; however, it seems that add_self_tokens in modules/field/views_handler_field_field.inc uses a conditional which is not present in document_self_tokens; commenting out the condition
if (isset($item['raw']) && is_scalar($item['raw'])) {
makes [field_trip-tid] available (I realize that simply commenting out this conditional is probably not the solution though!).
Comments
Comment #1
merlinofchaos commentedYou should try this in -dev.
Comment #2
esmerel commentedComment #3
edsko commentedMy apologies. This does work in -dev. I couldn't find it in the issues so I assumed it was an unknown bug. I should have tried first.
(My view didn't work anymore when I upgraded to dev; it used an image field, but none of the images were shown anymore and I received a lot of notices about 'alt' and 'title'. When I rebuild the (same) view from scratch it worked fine though.)