I'm trying to unpublish content via Rules during a cron run. When I run cron and the action fires I get messages like: "You do not have permission to moderate Foo".

I'm using the "Set moderation state" action (workbench_moderation_set_state_rules_action()). Because cron runs as user 0, I need to use the "Force transition" checkbox to bypass the node access checks.

In commit 808b1a23afbd47f58aee5d5482b357149acd0531 from issue #1787214: VBO action to change state has a blank checkbox and sets the state back to the original state after it is changed the bypass for $context['force_transition'] was ripped out.

Comments

gabyyy’s picture

Same problem here with Rules 2.9 and Workbench moderation 1.4
Looks like the update to 1.4 broke this feature.

joel_osc’s picture

Ran into this too, did a patch -R on the patch mentioned above fixed the issue.

gabyyy’s picture

joel_osc, which patch are you referring to?

joel_osc’s picture

gabyyy’s picture

Any chance of fixing this issue without having to unpatch the 1.4 version?

codevoice’s picture

+1 same problem here.

benstallings’s picture

Status: Active » Needs review
StatusFileSize
new719 bytes

Here is a patch to re-implement force_transition. I'm not very experienced with patches, so I hope it's in the right format!

Status: Needs review » Needs work
alexverb’s picture

Status: Needs work » Needs review

The patch looks good to me. I don't understand why it's failing. Let's try one more time.

jlashomb’s picture

This patch worked for me.

guillaumeduveau’s picture

Also interested

anrikun’s picture

Version: 7.x-1.4 » 7.x-3.x-dev
StatusFileSize
new728 bytes

Let's try this one.

Status: Needs review » Needs work

The last submitted patch, 12: force_transition-2476489-12.patch, failed testing.

tessa bakker’s picture

Status: Needs work » Postponed
Related issues: +#2832600: CI error on tests, because of old test module

Patch in #2832600: CI error on tests, because of old test module needs to be committed first, until then, every test will fail.

tessa bakker’s picture

Status: Postponed » Needs review
sgdev’s picture

@anrikun, thanks for adding the updated patch. Looks like a simple fix... we'll test and if it works as expected will return and mark as RTBC.

benstallings’s picture

Status: Needs review » Closed (outdated)

Now that this issue is closed, please review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, please credit people who helped resolve this issue.