Closed (works as designed)
Project:
Token
Version:
6.x-1.15
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
4 Mar 2011 at 05:32 UTC
Updated:
26 Jul 2011 at 03:10 UTC
Jump to comment: Most recent file
Comments
Comment #1
dave reidThat part of the array only controls how the tokens are grouped. It does not have to match the $type parameter. You'll find CCK does the same thing.
Comment #2
willieseabrook commentedReopening. I'm certain there is a problem here.
See the attached screenshots.
oldcode.png shows what I see in a panels view edit using the 6.x-1.15 code, newcode.png shows what I see with my patch applied.
My patch may be a sub-optimal solution, but there is certainly a problem here. As you can see in the screenshots, the list of available tokens is destroyed when book module is enabled.
The next question is, is this a panels/context issue or a tokens issue?
I've debugged through token_get_list, and dumping $return, shows that's where the issue first occurs. Ctools/context is simply using what it's given by token_get_list, and when book_token_list is used, token_get_list is returning almost no values.
To repeat the issue:
1. Install panels, views, ctools etc, tokens.
2. Create a view with an argument. Any view.
3. Create a panel node and add the view to the panel.
4. In panel content tab, click settings on the view pane. You will see all the tokens available.
5. Enable book module.
6. In panel content tab, click settings on the view pane. --> You see only a handful of tokens.
Comment #3
dave reidThen Panels is choosing to only display $tokens['node'] and not all the tokens possible.
Comment #4
willieseabrook commentedIf panels was only requesting "node", then turning book module on/off should have no effect.
However, when book module is turned on, all the "node" tokens disappear.
Thinking out loud here.
This implies either panels is requesting "all", and can't handle the case where get_token_list returns more than a single category,
or,
there is some issue with the get_token_list function not working well when all is requested and multiple categories of tokens is returned.
I'll do some more debugging on this and see *exactly* what is happening then report back.
Comment #5
dave reid@willieseabrook: Any update? I'm guessing this falls under "panels ... can't handle the case where get_token_list returns more than a single category"
Comment #6
dave reidNo response in over a month, so marking as works as designed.