Quick summary: When using content moderation + workflows on a site with 4 languages or more, the interaction between the translations leads to some of them disappearing from the site.
Explanation:
(Hello everyone, thank you for taking some time to check this out)
- You need a multilingual site with at least 4 languages to test this
- You need to enable content moderation (use default editorial workflow states, draft, published, archived), languages (remember, at least 4) and revisions.
Steps:
1) Create a content in any language, doesn't matter if published or in draft state
2) Create a default translation in language B: can either be published or archived
3) Create a draft translation in language C: at this point you should be able to see 3 versions of your content in the node/nid/translations page
4) Create a default translation in language D: can be archived or published, doesn't matter. At this point you can see the issue.
This is a screenshot of the translations UI at step (3)
This is a screenshot of the table content_moderation_state at step (3)
And these are the same screenshots after step (4)
The line where content_entity_revision_id = 20
and langcode = es
is no longer on the second screenshot, and also the actual translation disappeared from the UI and from the site.
Here is a video I made with all these steps (index in description of the video):
youtube video
Notice that the actual revision is still in the database, in the end of the video I get it back by adding it again and reverting to the previous revision. This is a workaround and does not fix the issue.
So far our actual workaround has been to force the first state of every translation to be in draft using the patch from this issue:
When adding a new translation the entity should start from the draft state →