When I try to unpublish a live revision, I got an OK message (" The live revision of this content has been unpublished.") but the revision is still published!
See screenshot: taken just after I clicked on "Unpublish" (under Moderation Actions) and then confirmed the action when prompted "Are you sure that you want to unpublish the live revision of this content?".
(URL /node/.../moderation/.../unpublish)

notes
-the moderation state did change, so it looks like there's a mismatch between status flag and moderation state
-this only happens if the node has no current draft. If there's a pending draft, the live revision is indeed unpublished.
-on watchdog, I get this message "Saved node revision: 10173 as live version for node 65."

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

ryanc’s picture

Have you looked the bug with EntityCache?

https://drupal.org/node/1330562

I believe it may only affect unpublished revisions, because "published" nodes use $reset=true on node_load(), and avoid the EntityCache issue.

pbattino’s picture

@ryanc I don't have EntityCache.

iSoLate’s picture

I created a patch so that when depublishing a node actually gets the node unpublished so a published revision is no longer live, that also works when taking a node offline with scheduler.

iSoLate’s picture

The patch in #3 is not correct actually... in this case we don't know about scheduler... this was just for my personal case.

pfrenssen’s picture

pbattino’s picture

Why a duplicate of #1436260? As I stated, I'm trying to unpublish the node FROM WITHIN Workbench moderation.

pbattino’s picture

Status: Closed (duplicate) » Active
pfrenssen’s picture

I'm sorry, I should have provided some more context.

I think this is caused by the same problem that is solved in #1436260: Saving nodes outside Workbench Moderation leads to incorrect state transitions (e.g., "needs review" appearing as published). Can you try that patch and see if it solves your problem?

pbattino’s picture

I already applied the patch #3 and it worked, so for now I'm OK.

AdamPS’s picture

Status: Active » Fixed

Just trying to help by tidying up. So if I understand correctly, OP @pbattino has confirmed that this issue is fixed by the patch for #1436260: Saving nodes outside Workbench Moderation leads to incorrect state transitions (e.g., "needs review" appearing as published).

pbattino’s picture

No, I confirmed that it's fixed by the patch at #3 in this page.
I'm now on 7.x-1.4 (and I don't have this issue) so I can't test 1.3 code any more.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.