Problem/Motivation

The revisions-overview form for translated nodes shows a current revision only for the language the revision was saved in. The revision is listed correctly, but it's not marked as current.

Steps to reproduce

Visit the revisions tab for a translated node in different languages. Only one of the translations will have the "Current revision" line. Save a different translation of the node, and you'll see this last language will be the only one with the "Current revision" line.

Proposed resolution

Imitate what was done in Drupal core over 3 years ago, in #2938947: Always list a "Current revision" for each available content translation.

Remaining tasks

User interface changes

API changes

Data model changes

Issue fork diff-3227907

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

antiorario created an issue. See original summary.

antiorario’s picture

antiorario’s picture

Status: Active » Needs review
StatusFileSize
new1.69 KB

Here's a patch, in addition to the merge request.

liquidcms’s picture

Works for me. Thanks.

heddn’s picture

Status: Needs review » Needs work

For this to be reviewed and accepted, please review https://git.drupalcode.org/project/diff#contribution-guidelines. Since this is a decidedly old contribution, it likely needs a reroll/rebase. Additionally, we'll need some tests.

acbramley’s picture

Status: Needs work » Postponed

Postponing this on #2722307: Move translation based conditions into database query on revisions overview page once that is in we can apply the same logic to Diff.

acbramley’s picture

#3418442: Revisions should be filtered by language in the database query is ready for review, it would be great if anyone here could test those changes and report back if the issues are fixed.

rosk0’s picture

Hi Adam,

I've tested the patch from #3418442: Revisions should be filtered by language in the database query and saw no difference with the current state, e.g. this issue is not addressed. My test case node still have the current revision listed only on one of the translations.

acbramley’s picture

Version: 8.x-1.x-dev » 2.x-dev

I wonder if we need a similar change in Diff as what core did in https://git.drupalcode.org/project/drupal/-/commit/2feaa29915412cac4a037...

Essentially we'd just need to add a $entity = $this->entityRepository->getActive($entity->getEntityTypeId(), $entity->id());

The changes in the MR are also already present in the 2.x branch.