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
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 3227907-4-list-current-revision-all-translations.diff | 1.69 KB | antiorario |
Issue fork diff-3227907
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:
- 8.x-1.x
changes, plain diff MR !8
- 3227907-current-revision-listed
changes, plain diff MR !7
Comments
Comment #2
antiorario commentedComment #4
antiorario commentedHere's a patch, in addition to the merge request.
Comment #7
liquidcms commentedWorks for me. Thanks.
Comment #8
heddnFor 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.
Comment #9
acbramley commentedPostponing 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.
Comment #10
acbramley commented#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.
Comment #11
rosk0Hi 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.
Comment #12
acbramley commentedI 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.