Needs review
Project:
Workbench Moderation
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Apr 2013 at 17:22 UTC
Updated:
25 Mar 2015 at 16:23 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
hazah commentedThis issue still persist. Any assistance would be appreciated.
Comment #2
quartsize commentedI'm not really sure this is the right approach, but here's the patch I'm using.
Comment #2.0
quartsize commentedChanged description to steps to reproduce.
Comment #3
quartsize commentedI believe #2.0 is being inaccurately ascribed to me.
Comment #4
ezheidtmann commentedI'm also experiencing this issue. Haven't tested the patch yet.
Comment #5
hazah commentedAfter a long investigation I have found out the following: The culprit is the option to "Limit available menu items based on Workbench Access. ". If this is checked, then the section is not assigned. It looks like a catch-22 issue when this happens. Essentially, you are denied permission on a section that does not yet exist. As such this may actually rest with the Workbench Access to resolve the issue. If I'm correct this patch will not do anything either. If you have similar outcomes, please let me know, this could be a non-issue for this module, but another issue may need to be opened on the access side of things. Cheers.
Comment #6
damienmckennaThis also needs to be rerolled against v7.x-1.x-dev.
Comment #7
star-szrRevised the patch to clarify the comment and converted the tab indentation to spaces.
This solved the incompatibility between Workbench Access and Workbench Moderation for us.
Comment #8
jbylsma commentedI was able to duplicate this issue with the following:
The core of this issue is that, during
workbench_moderation_store(), the$live_revisionnode is loaded but not run through thenode_preparehooks, wheremenu_node_prepare()sets the node's menu property. Outside of Workbench Access, this isn't a big deal; any menu action was already done during the ordinaryhook_nodeflow. However, when Workbench Access is using Menus and the standard node form element (not using the Workbench Access form element), it requires the menu property to assign the node to a section.I've attached two patches. The first patch streamlines the previously posted patches. It only calls
menu_node_prepare()on the$live_revisionnode, and then prepares the menu property formenu_node_save()(see this API comment, Drupal core issue 1 and 2).The second patch runs
node_object_prepare()on the$live_revisionnode, which includes thenode_preparehooks. This will load the menu property. Even though thenode_preparehooks are used for FAPI display preparation, which isn't going to happen inworkbench_moderation_store(), running them may still be beneficial. The following core modules usenode_preparehooks:The patches have been created against the current development branch. Thanks!
Comment #11
jbylsma commentedWhen the WM tests kicked back in, these patches were out of date. Attached rerolls.
I'd currently recommend using the first patch that only addresses the menu. Using
node_object_prepare()does seem nicer, but it could introduce potential complications that aren't necessary to solving the immediate issue of getting Workbench Access with menus and Workbench Moderation playing together.