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

Comments

anacolautti created an issue. See original summary.

anacolautti’s picture

Issue summary: View changes
anacolautti’s picture

Issue summary: View changes
anacolautti’s picture

anacolautti’s picture

Issue summary: View changes
anacolautti’s picture

Issue tags: +default states
anacolautti’s picture

Title: (Published or archived) translation disappears (from UI and site) » Translated node disappears (from backend UI and public site)
anacolautti’s picture

Update: the fix we implemented seemed to work so far. If all contents are saved as draft first, the issue appears to be avoided (not fixed, just avoided).

anacolautti’s picture

Issue summary: View changes

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.9 was released on November 6 and is the final full bugfix release for the Drupal 8.7.x series. Drupal 8.7.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.8.0 on December 4, 2019. (Drupal 8.8.0-beta1 is available for testing.)

Bug reports should be targeted against the 8.8.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.9.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

sam152’s picture

Issue tags: -multilingual site, -content moderation, -revisions, -states, -default states +content moderation multilingual bug

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

brenk28’s picture

Can confirm we are seeing this as well. (In our case we had more languages, so the trick to reproducing seems to be to publish all except for the n-1 translation, make that draft and then the last translation published.)

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
rajandro’s picture

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.15 was released on June 1st, 2022 and is the final full bugfix release for the Drupal 9.3.x series. Drupal 9.3.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.4.x-dev branch from now on, and new development or disruptive changes should be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

anacolautti’s picture

Issue tags: -
StatusFileSize
new708.82 KB

I tested this issue again in a Drupal 10.1.7, and could not reproduce it anymore.

This is a screenshot of the database in each of the steps mentioned in the ticket:

database state at each step

Could it be, that this got fixed after fixing one of the related tickets?

phonoman’s picture

We just had this happen with D10.3.9.
I'm not quite sure about the steps and publishing statuses that were taken, but the site had an English translation, then Swedish one was added, and at some point Swedish translation disappeared. It could be restored by recreating the translation and reverting, as mentioned.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.