"Discard Draft" for a translation edits the base language node
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3194841. --> Reported by: [bgilhome](https://www.drupal.org/user/313439) >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>When viewing a draft of a translated node and clicking "Discard Draft", \Drupal\content_moderation\ModerationInformation::getDefaultRevisionId() is called, which has no language awareness as far as I can tell.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Create a node in the base language on a multilingual site. Create a translation. Create a draft for each of the base language node &amp; translation. On the translated node, click "Discard Draft". Expected behavior is for the translated node's moderation sidebar to show no longer show any draft information - actual behavior is that the translated node's moderation sidebar shows "Draft available", while the base language node's draft has been discarded.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Call \Drupal\Core\Entity\EntityRepository::getTranslationFromContext() on the loaded revision. Attached patch adds this after the loadRevision call.</p> <p>Are there any core issues asking for \Drupal\content_moderation\ModerationInformation::getDefaultRevisionId() to be translation-aware e.g. via a langcode parameter? I couldn't find any.</p>
issue