Active
Project:
Views (for Drupal 7)
Version:
7.x-3.5
Component:
page displays
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
16 Mar 2011 at 14:53 UTC
Updated:
13 Nov 2018 at 16:52 UTC
Jump to comment: Most recent
Comments
Comment #1
kenorb commentedProbably because token values are executed twice? And second time are empty?
Comment #2
kenorb commentedThe same when executed this like in pre_render:
Before upgrading from Views2 I had no similar problems with that hook. But it was rather object change, not a function call.
Comment #3
kenorb commentedAs a workaround, is there any other methods getting or setting items without breaking tokens?
Comment #4
kenorb commentedIt's related to feature: #349178: Generic Link handler
File: /handlers/views_handler_field.inc
Git link: http://drupalcode.org/project/views.git/blame/429d3608a94b0a2436c7cd6006...
When it's working, first condition is executed, when I add get_item, second condition is executed, that's empty token value.
Comment #5
dawehnerhook_views_pre_render is perhaps too late to do it.
Something like hook_views_pre_build might be better.
Comment #6
kenorb commentedTried with hook_views_pre_build, hook_pre_render, hook_pre_execute and there is the same problem.
Without code does work, with code (even get_item) doesn't work.
Comment #7
kenorb commentedDid workaround in hook_views_post_render.
Token doesn't disappear then.
Comment #8
dawehnerYou could have used hook_views_pre_render and directly alter $view->filter['id']
Comment #9
kenorb commentedIt's fixed?
It's a bug report. Views should render all tokens (which is allowed), not only the first one, without any workarounds.
Comment #10
twardnw commentedI too am having this issue. As soon as I have a
$view->get_item()in my hook_views_pre_render I lose my tokens.Comment #11
kenorb commented