Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
27 Oct 2010 at 23:23 UTC
Updated:
2 Jul 2014 at 01:20 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
eclipsegc commentedComment #2
merlinofchaos commentedCommitted.
Comment #4
azinck commentedThis change is rather disruptive and, frankly, seems to break the API. The #post_render callback does have the advantage of passing the entire rendered content of the page (thus letting you parse/replace tokens in the entire rendered content), but it doesn't give you access to all the variables provided to hook_preprocess_page (like the page title). Frankly, the #post_render callback gives us very little access to anything useful in the way of variables.
Not only that, but ctools_page_token_processing() now refers to a $variables array which is no longer passed in. See #1964874: $variables not injected properly into ctools_page_token_processing() .
I don't know the direction we want to go here. The fact that this has been effectively broken for 3 years and no one's complained makes me think that we can keep things mostly as-is and just rename the references to $variables to instead refer to $elements. It's not that useful ($elements contains little of use) but it's the least disruptive option to the API and allows us to use callback tokens without incurring errors.
Comment #5
azinck commentedComment #6
saltednutStill in need of review. Unsure why assigned to Eclipse still, but that seems off...
Comment #8
japerryYup, I agree with Aaron that the original change wasn't optimal -- this patch should remove the errors; it tested good for me, and its committed now.