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.
| Comment | File | Size | Author |
|---|---|---|---|
| #12 | 3359192-display-current-revision-12.patch | 9.59 KB | silvi.addweb |
| #11 | 3359192-3004705-3227907-1.patch | 4.09 KB | bingol@ciandt.com |
| #10 | 3359192-display-current-revision-11.patch | 10.03 KB | jphuxley |
| #9 | 3359192-display-current-revision-9.patch | 9.34 KB | jphuxley |
| #7 | 3359192-display-current-revision-7.patch | 6.3 KB | jphuxley |
Issue fork diff-3359192
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
Comment #2
jphuxley commentedComment #4
jphuxley commentedComment #5
jphuxley commentedComment #6
jphuxley commentedIn hindsight, happy to move this to 3227907 as I don't think we need two issues for this.
Comment #7
jphuxley commentedAdding patch version if it helps.
Comment #8
jphuxley commentedComment #9
jphuxley commentedAdding 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.
Comment #10
jphuxley commentedAnother 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.
Comment #11
bingol@ciandt.com commentedComment #12
silvi.addweb commentedre-roll patch #10.
Comment #13
acbramley commentedPlease update to use an MR