Problem/Motivation

This relates to two issues: https://www.drupal.org/project/diff/issues/3227907 and https://www.drupal.org/project/drupal/issues/3021671

Diff currently takes over the node revision list, but has not been kept up to date with changes made in the core Node module.

Firstly, as with 3021671 it is missing 'current revision' for translations, which could be fixed by applying the patch in that issue. However, there is an issue with the core Node module that is described in 3021671 and also happening in 3227907: in the core module, it will display a current revision on every page, rather than just 1.

Steps to reproduce

  • Create a node, and add a translation.
  • Add enough revisions to create more than 1 page.
  • No current revision will be listed.

Proposed resolution

I have ported the patch from 3359192. We need to keep an eye on that issue and port over anything that is merged. For anyone encountering the issue in the meanwhile, the MR should help.

Issue fork diff-3359192

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

JPHuxley created an issue. See original summary.

jphuxley’s picture

jphuxley’s picture

Title: Node revisions tab have "Current Version" on every Page » Display current revision for translations on first page only
Issue summary: View changes
jphuxley’s picture

Issue summary: View changes
jphuxley’s picture

In hindsight, happy to move this to 3227907 as I don't think we need two issues for this.

jphuxley’s picture

StatusFileSize
new6.3 KB

Adding patch version if it helps.

jphuxley’s picture

Status: Needs work » Needs review
jphuxley’s picture

StatusFileSize
new9.34 KB

Adding new version of the patch which also takes in to account the issue described here (another core issue): https://www.drupal.org/project/drupal/issues/3092558

This only affects new translations that only have draft revisions and no published version - core Drupal will display the default language revision page which is confusing for the user.

I've moved the changes from the latest patch across to this patch and also added a fallback which checks if the there is no current revision (as per the new method) and the node is unpublished; in this case we need to assume the first revision is the latest because they should all be drafts and there will be no revision_default.

jphuxley’s picture

StatusFileSize
new10.03 KB

Another slight tweak - this time to fix an issue with the current revision link going to the wrong place in certain scenarios. If there are no published revisions we want to point it at the revision (as the 'view' tab will display the published version, and this is a draft revision), otherwise we want it to link to the same as the 'view' tab.

bingol@ciandt.com’s picture

StatusFileSize
new4.09 KB
silvi.addweb’s picture

StatusFileSize
new9.59 KB

re-roll patch #10.

acbramley’s picture

Status: Needs review » Needs work

Please update to use an MR

juanramonperez made their first commit to this issue’s fork.