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."
Comment | File | Size | Author |
---|---|---|---|
#3 | workbench_moderation-cannot_unpublish_live_revision-2230531-3.patch | 1.59 KB | iSoLate |
workbench-screenshot.png | 107.68 KB | pbattino |
Comments
Comment #1
ryanc CreditAttribution: ryanc commentedHave 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.
Comment #2
pbattino CreditAttribution: pbattino commented@ryanc I don't have EntityCache.
Comment #3
iSoLate CreditAttribution: iSoLate commentedI 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.
Comment #4
iSoLate CreditAttribution: iSoLate commentedThe patch in #3 is not correct actually... in this case we don't know about scheduler... this was just for my personal case.
Comment #5
pfrenssenThis is a duplicate of #1436260: Saving nodes outside Workbench Moderation leads to incorrect state transitions (e.g., "needs review" appearing as published).
Comment #6
pbattino CreditAttribution: pbattino commentedWhy a duplicate of #1436260? As I stated, I'm trying to unpublish the node FROM WITHIN Workbench moderation.
Comment #7
pbattino CreditAttribution: pbattino commentedComment #8
pfrenssenI'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?
Comment #9
pbattino CreditAttribution: pbattino commentedI already applied the patch #3 and it worked, so for now I'm OK.
Comment #10
AdamPS CreditAttribution: AdamPS commentedJust 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).
Comment #11
pbattino CreditAttribution: pbattino commentedNo, 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.