Problem/Motivation
When saving a new revision of an entity to have a moderation state that affects the default state it is possible to inadvertently change other translations of the entity to become the default revision. An update made prior to Content Moderation being committed prevented translations inadvertently becoming unpublished due to this issue, but in turn caused draft revisions to become "missing", although they exist in the database they cannot be accessed via the UI to create a new revision from.
Steps to reproduce
- Enable Content Translation and Content Moderation modules
- Add french language on languages page (i.e. /admin/config/regional/language)
- Enable translation for article node type on content translation page (i.e. /admin/config/regional/content-language)
- Enable "editorial workflow" for article node type on workflow's edit page(i.e. /admin/config/workflow/workflows/manage/editorial)
- Create an article in english and publish ('Save and Publish' button)
- Translate to french and publish ('Save and Publish' button)
- Go to french version of the article. Make changes and save as draft ('save and Create New Draft (this translation)' button)
- Go to english version of the article, you won't be able to add a new revision.
Actual:
Article reverted back to last published version and no draft version available in revision tab (ref: screenshot).
Proposed resolution
Prevent users from changing the moderation state to something that would cause cause a draft revision to become "missing".
Remaining tasks
- Review.
- Improve help text.
- Follow up to rework translations / revisions storage to allow complex workflows.
User interface changes
- Removal of save buttons which will cause issues.
- Additional help / error text.
API changes
none
Data model changes
none