Generated with the help of an LLM.
Problem/Motivation
The review listings don't take translations into account:
ReviewQuery::base()adds astatuscondition on the data table without adefault_langcodecondition. So a node that is published in one language and unpublished in another shows up in both "Needs review" and "Unpublished drafts". Deleting it from the drafts tab is then refused with "you cannot delete it", as the default translation is published.- The review fields are not translatable, which makes sense. But saving any translation counts as a review of the whole node. So a quick fix in the English version marks the Dutch content as reviewed too.
Steps to reproduce
- Enable content translation for a tracked type.
- Create a published node, add an unpublished translation.
- Open the dashboard: the node is on "Needs review" (once due) and on "Unpublished drafts".
Proposed resolution
- Add
->condition('default_langcode', 1)inReviewQuery::base(), or only look at the default translation for the status. - For the auto-review on save: maybe only count saves of the default translation, or make it a setting. Not sure what makes most sense here, as some sites will review per language. What do you think?
Remaining tasks
- Decide on the second point.
- MR with a kernel test for the translation case.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork content_reviewed_date-3636489
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
ajetiv1fixed in 690c390; default translation decides; the translation-save setting is on by default; kernel test included.