Generated with the help of an LLM.

Problem/Motivation

The review listings don't take translations into account:

  • ReviewQuery::base() adds a status condition on the data table without a default_langcode condition. 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) in ReviewQuery::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.

Command icon 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

    svendecabooter created an issue. See original summary.

    • ajetiv1 committed 690c3900 on 1.2.x
      Issue #3636489 by svendecabooter, ajetiv1: Translations with a different...
    ajetiv1’s picture

    Status: Active » Fixed

    fixed in 690c390; default translation decides; the translation-save setting is on by default; kernel test included.

    Now that this issue is closed, review the contribution record.

    As a contributor, attribute any organization that helped you, or if you volunteered your own time.

    Maintainers, credit people who helped resolve this issue.

    Status: Fixed » Closed (fixed)

    Automatically closed - issue fixed for 2 weeks with no activity.