As a site administrator or any other user with access to Workbench:
- Create new node.
- Save the node contents.
- Change the state from "Draft" to "In review" using either the box on top of the content or the Moderation tab,
- Go to the Needs Review tab (
admin/workbench/needs-review) – you will see the node title on a list.
- Click on the title.
- The link
/node/[number]/revisions/[rev_number]/view will be opened.
- Access denied will appear.
To work-around that issue, a user that submits the content for a review should save it after changing its state.
A reviewer might have a problem accessing it if an editor forgets this step since accessing from "In Review" by clicking on a title won't be possible.
The error goes away after re-saving (after state has been changed) also for the revision viewing link that previously wasn't working (/node/[number]/revisions/[rev_number]/view where rev_number is the number of a first revision).
Is it known error? Are there any other workarounds or patches for that issue?
Comments
Comment #1
leonevers commentedThis is really a critical bug if useing revisioning, because it leads to a unnecessary new draft to make a publishd draft visible to guests.
Comment #2
protractor commentedI ran into the same problems. With this bug the module is unusable with revisions. The expected behavior is that after set the state to Published the node is directly visible without the need of a second manipulation and the resulting unnessesary Draft. I think there is a bug with the save functionality while changing the state. Is it possible to get more informations in how the things work internaly there to have it more easy to go into the code and possibly writing a patch?
Comment #3
leonevers commentedI made a patch to check and correct the access for anonymous users. After that the behaviour is like expected. Maybe that helps.
Comment #4
leonevers commentedThere was a error in the patch from comment #3 - here is a better one.
Comment #5
leonevers commentedHere is a version of that pacht, that hopefully touches no other permision outside of workbench_moderation.
Comment #6
protractor commentedThis patch look good for me. I took a look to the code and it should not touch other permissions. Thx for the work.
Comment #7
protractor commentedComment #8
leonevers commentedHere is a patch version that will only change the permissions if we are in a node/view context - maybe there is a way to nail it down to nodes that are under workbench-moderation only.
Comment #10
leonevers commentedcorrected patch version due to faild test...
Comment #11
hass commentedPlease create Git patches.
Comment #12
hass commentedComment #13
hass commented#10: workbench_moderation-access_denied-1883556-10.patch queued for re-testing.
Comment #14
protractor commentedI will provide leonevers patch as a git diff from the dev repo clone of workbench moderation.
Comment #15
leonevers commentedthx protractor :-)
Comment #17
protractor commentedAnother try with corrected line breaks. Sorry, is also for me the first time I send something here.
Comment #18
siefca commentedHi,
In my case it hasn't fixed the bug.
What's interesting, the function
workbench_moderation_node_accessis not even called when viewing a moderated content. (Why?)I also noted (patch didn't changed it) that moderation status presented within a content (in a small box on top of previewed content) is always an old state, even if changed to a new state (the moderation tab shows the state correctly), until a content is saved again.
Comment #19
protractor commentedDo you have other modules that could have influence to the nodes user access? I tested it with the actual drupal 7 version and Workbench 7.x-1.2 + Workbench Moderation 7.x-1.3+4-dev.
Comment #20
siefca commentedI just udpated to Workbench 7.x-1.2 and Workbench Moderation 7.x-1.3+4-dev (with your patch) and having the same results.
Comment #21
siefca commentedI set up fresh Drupal install (7.19) with just Workbench Moderation and your patch is working!
My problem is that I have custom view that handles couple of more workbench states and the title rendering somehow uses revision number instead of current revision. When using that view in a fresh install the same error occurs.
Comment #22
alex030 commentedI had the same problem. After running the patch from #17 revisions and workbench works as expected.
Thanks guys great job.
Comment #23
hass commented"!$node->status" is the same.
code style
trailing space
Comment #24
hass commentedComment #24.0
hass commentedtypo fixed
Comment #28
Rotozaza commentedWe have the same problem while 'Published' form select on 'Draft' or 'Moderation' page, WM 7.x-1.4. We use one role accessing all transitions where all editors are part of this role.
With the patch non admins see node by alias, no access denied any more. But although it has state published, it doesn't appear for non admins in any content lists as 'Content', 'Workbench' or 'Views'.
And it doesn't solve the issue when changing state to 'Published' by moderation links in views as seen in 'My Drafts' and 'Needs Review' views of Workbench. There we still have access denied.
Only repair access right or disable SQL rewriting in views fix it.
----
Revisioning was interfering: Incompatible with Revisioning module [#1894194] | Drupal.org
Comment #29
letrollpoilu commentedThe patch #17 worked for me but it also open any nodes to be edited or deleted by any Anonymous users ! Which is a HUGE security issue, even though the permissions were set properly. Is there any other work around this issue ?