I added the 'workbench information' to the panels 'Node template' page, it doesn't show anything.
When I disabled the 'Node template' page, the node can show the workbench information normally.
Thanks
| Comment | File | Size | Author |
|---|---|---|---|
| #27 | 1357788-27-workbench-info-pane.patch | 2.13 KB | raystuart |
| #25 | 1357788-25-workbench-info-pane.patch | 2.2 KB | becw |
| #7 | Screenshot at 2011-12-30 15:40:21.png | 49 KB | rogical |
| #1 | Screenshot at 2011-12-01 15:01:17.png | 119.26 KB | rogical |
| #2 | Screenshot at 2011-12-01 15:01:17.png | 119.26 KB | rogical |
Comments
Comment #1
rogical commented--
Comment #2
rogical commentedAlso, I can't retrieve workbench information on views,
This is the views SQL:
It returns no result, while the node is moderated.
Comment #3
stevectorI know there can be issues with Panels on node/%node when there isn't a full node content pane. Please try that. The results will help debug.
Comment #4
rogical commentedYes, the 'Workbench Moderation: Current' can display now, but it displays all values -- Yes and No, two rows.
Comment #5
rogical commentedComment #6
stevectorCan you post a screenshot of what's displaying now?
Comment #7
rogical commentedsorry for a bit late, let's ignore the views first.
I'm always using Panels on node/%node, but 'workbench information' just can't display, that's very sadding.
Can you help with this? As I must use panels and workbench together.
Thanks very much!

Comment #8
rogical commentedAs 'Workbench information' is defined in Workbench.
Hope someone helps!
Comment #9
lsolesen commentedThis bug makes it hard to use workbench together with panels, as it is hard for the admin user to see the current state of the node. Is there any progress - or will it not work together? What needs to be done? Related to #1462724: Workbench information block is not shown when added in panels node_view
Comment #10
agentrickardThis behavior is actually defined in the individual modules. In Workbench Access, for instance, the block hook is:
Workbench Moderation is a little more strict:
In theory, the function workbench_block_view() could try to derive the $node object and pass that to the hook, but that's an API change. At the least, we should standardize how each module decides the page is a node.
There is also no intention to support multiple nodes on a page with that hook.
What can be done depends largely on how Panels internals work when it rewrites the path node/%. If Panels breaks menu_get_object(), then someone needs to suggest a safer lookup function.
Otherwise, I'd call it a nasty Panels bug for breaking core.
Comment #11
liquidcms commentedi added like this:
- create 2 custom re-usable content panes
and then set visibility rule for each based on "string url" = node/*/draft (set Reverse for Current)
works like a charm.. :)
Comment #12
agentrickardarg() is never a good solution.
Comment #13
liquidcms commentedlol.. ok.. why is that?
Comment #14
agentrickardhttp://api.drupal.org/api/drupal/includes!bootstrap.inc/function/arg/7
Comment #15
Taxoman commented(If this is also a problem in 2.x, it should be moved to that queue.)
Comment #16
alexkb commentedWhen using panels, the node_is_page() still returns the correct result. One problem however is that the $view_mode argument is set to "page_manager" when it gets to workbench_moderation_node_view().
The other problem is that the hook_node_view() (which sets the static $messages variable for workbench_moderation) is called after hook_block_view(), so when hook_block_view() runs, it doesn't have any message data to show.
Comment #17
alexkb commentedagentrickard, would you say it's ok to use the node id provided in the $args variable passed to ctools content type pane's? I've just created one to solve this problem, and it seems to work ok.
Comment #18
agentrickardI don't know what that code is for.
Comment #19
alexkb commentedSorry, it's the main component of a ctools plugin, that will give you a new content pane for workbench, that will actually work without patching workbench or panels. I'll create a sandbox module to make things easier if you like.
Comment #20
agentrickardNo, its fine as a patch, though the specific call to workbench_moderation_messages() should be removed.
Comment #21
timwoodI just discovered a work-around to get the workbench information area to appear in a panel. When I add the "Node > Node links" object to my panel, the default workbench information area appears. You don't even have to add the "Workbench information" object. Actually if you do add the "Workbench information" object it will appear twice.
I'm using workbench 7.x-1.2, workbench moderation 7.x-1.3, ctools 7.x-1.3 and panels 7.x-3.3+36-dev.
Comment #22
agentrickardThat sounds like a proper fix rather than a workaround. The issue here is that Panels doesn't load the node object for other processes to read.
Comment #23
timwoodJust to follow up on my post above. When I remove the "Workbench information" block from the Drupal blocks system for my theme and try to place the "Workbench information" object in my panel, it will only display if certain node objects (Node links, Node content (Full Content)) come BEFORE it in the same pane or in any order in a different pane. The Node title object does not have the same effect.
Comment #24
agentrickardYeah. that's a Panels issue. I'm very tempted to won't fix this.
Comment #25
becw commentedI agree that this is in part a panels issue, but it is also partly due to the fact that workbench moderation relies on replacing the default node view callback.
Pragmatically, it might make sense to just provide a panels pane for the workbench info, which can be used instead of the workbench info block when the info needs to be displayed inside a panel. Even though the issue is related to workbench moderation, it's workbench that provides the info block (since the info block is used by workbench access, too)--so yes, this pane does belong here in workbench.
Patch attached. This is based on alexkb's work above--thanks!
Comment #27
raystuart commentedRe-rolling the same patch from 7.x-1.x branch.
Comment #28
afoster commentedConfirming #27 worked for me on 7.x-1.2
Note that makes a new workbench > Workbench content status pane...
Place that one,
NOT the Miscellaneous > Workbench Infomation (Block)
Comment #29
sgdev commentedWe have no need (or interest) to add "Node > Node links" in to our pages. Restating the comment I made on issue #1462724, which I considered directly interconnected to this issue:
-----------
I think both this patch (#27) and the one in #1462724 are of value. It really depends on what you need to accomplish.
This patch is a more modular solution in that it creates a new panel pane rather than relying on a panels-enabled block. If you want to be able to configure and move the pane in page manager, this is the way to go.
The other patch in #1462724 allows for the block to be configured outside of Panels. We want staff to be have the ability to move, add, and replace panel panes, but Workbench Information is one that we do not want them to remove or move.
By configuring it above the content area in the Blocks, and limiting access to the block configuration, it meets our needs.
I'm marking both of these as reviewed.
Comment #31
agentrickardCommitted.