From 5100132105528b7047b154787afd6459e5e10e18 Mon Sep 17 00:00:00 2001 From: rpnykanen Date: Tue, 12 Mar 2024 09:09:41 +0200 Subject: [PATCH 1/2] created patch to drupal/diff module --- patches/revision_overview_form.patch | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 patches/revision_overview_form.patch diff --git a/patches/revision_overview_form.patch b/patches/revision_overview_form.patch new file mode 100644 index 000000000..3064c2d42 --- /dev/null +++ b/patches/revision_overview_form.patch @@ -0,0 +1,18 @@ +diff --git a/src/Form/RevisionOverviewForm.php b/src/Form/RevisionOverviewForm.php +index 45c2c66..4ff4f3b 100755 +--- a/src/Form/RevisionOverviewForm.php ++++ b/src/Form/RevisionOverviewForm.php +@@ -209,7 +209,12 @@ class RevisionOverviewForm extends FormBase { + } + /** @var \Drupal\Core\Entity\ContentEntityInterface $revision */ + if ($revision = $node_storage->loadRevision($vid)) { +- if ($revision->hasTranslation($langcode) && $revision->getTranslation($langcode)->isRevisionTranslationAffected()) { ++ // Added key-check to always show the current revision on revision list. ++ // Check this issue: https://www.drupal.org/project/drupal/issues/3390329. ++ if ( ++ $revision->hasTranslation($langcode) && $revision->getTranslation($langcode)->isRevisionTranslationAffected() || ++ $key === 0 && $revision->hasTranslation($langcode) ++ ) { + $username = array( + '#theme' => 'username', + '#account' => $revision->getRevisionUser(), From 107d84d89ccc48219077394bcd4854edb6c346e8 Mon Sep 17 00:00:00 2001 From: rpnykanen Date: Tue, 12 Mar 2024 09:21:10 +0200 Subject: [PATCH 2/2] applied the patch --- composer.json | 3 +++ 1 file changed, 3 insertions(+) diff --git a/composer.json b/composer.json index 4ce2243f7..4fd820600 100644 --- a/composer.json +++ b/composer.json @@ -92,6 +92,9 @@ "[#UHF-885] Helfi-specific customizations to EU Cookie Compliance": "https://raw.githubusercontent.com/City-of-Helsinki/drupal-helfi-platform-config/923b35f699820b544397a35b7696570e101cd02c/patches/eu_cookie_compliance_block_8.x-1.24.patch", "[#UHF-8720] Missing config schema for dependencies (https://www.drupal.org/i/3330024)": "https://www.drupal.org/files/issues/2022-12-28/config_dependencies_schema-3330024-2.patch" }, + "drupal/diff": { + "Revision overview form problem, issue 3390329": "https://raw.githubusercontent.com/City-of-Helsinki/drupal-helfi-platform-config/5100132105528b7047b154787afd6459e5e10e18/patches/revision_overview_form.patch" + }, "drupal/paragraphs": { "https://www.drupal.org/project/paragraphs/issues/2904705#comment-13836790": "https://www.drupal.org/files/issues/2020-09-25/2904705-115.patch", "[#UHF-2059] Enhancements for the Admin UI": "https://raw.githubusercontent.com/City-of-Helsinki/drupal-helfi-platform-config/fdccb32397cc6fa19b4d0077b21a2b18aa6be297/patches/helfi_customizations_for_paragraphs_widget_8.x-1.12.patch"