Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Steps to reproduce:
- Author creates a new node and sets it to "Needs Review".
- Editor clicks "View draft" on the node and begins to read.
- While Editor is reading, Author edits the draft and saves his new revision without changing the moderation state.
- Editor finishes reading the (now non-current) revision, finds it acceptable, and uses the moderation form in the moderation messages to change the state to Published.
Expected result:
Editor should receive an error telling him that the version he tried to publish is no longer the current revision. Or, alternatively, the version that Editor was viewing becomes published, and the newer version submitted by Author becomes the current draft awaiting review.
Actual result:
The newer revision submitted by Author becomes the published revision, without Editor ever having seen the new changes. Thus, it may be possible for unreviewed changes to make it to the live site.
Comment | File | Size | Author |
---|---|---|---|
#1 | moderate_form_validate-1127722.patch | 2.14 KB | muriqui |
Comments
Comment #1
muriqui CreditAttribution: muriqui commentedI think I've fixed it by adding a validate function for the moderate form to re-check the current revision.
Comment #2
Cyclodex CreditAttribution: Cyclodex commentedsubscribing
please read also my comment on the issue here : #1127734: Add option to block creation of new drafts based on moderation state
Comment #3
Taxoman CreditAttribution: Taxoman commentedComment #4
becw CreditAttribution: becw commentedGood catch, and thanks for the patch! Committed in e78dc. (I did review it beforehand :)