diff --git a/composer.json b/composer.json index 278f3e1aa..768a2f6cb 100644 --- a/composer.json +++ b/composer.json @@ -95,6 +95,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" 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(),