Latest revision ID is not correct for multilingual content.

Created on 25 September 2019, almost 5 years ago
Updated 15 December 2022, over 1 year ago

Problem/Motivation

When a revision is scheduled, editors can have the latest draft copied back to the top of the revisions. For multilingual content, sometimes the default revision is copied to the top when the latest draft is scheduled.

Steps to reproduce:

  1. Create published article in English.
  2. Add a Spanish translation and publish it directly.
  3. Create a draft for the English version of the articlearticle.
  4. Create a draft for the Spanish translation as well.
  5. Schedule the English draft to be published (this is the latest English revision)
  6. When the scheduled transition is executed, the draft is published.
  7. Directly after that, a new revision is added back to the top with the previously published version, not the draft.

Proposed resolution

When debugging this, the problem seems to be the way the latest revision ID is determined in ScheduledTransitionsRunner::runTransition(). Instead of getLatestRevisionId() we should use getLatestTranslationAffectedRevisionId() for multilingual content.

Remaining tasks

Write patch
Review
Commit

User interface changes

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Needs work

Version

2.3

Component

Code

Created by

🇳🇱Netherlands seanB Netherlands

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇪🇸Spain vidorado Pamplona (Navarra)

    #7 Solved my problem. The latest revision was not being picked in a multi-language scenario, and now it is, correctly in all languages the entity is translated into.

Production build 0.71.5 2024