Skip to content
Snippets Groups Projects

Issue #3183592 : Get translation node before showing transitions.

1 file
+ 5
0
Compare changes
  • Side-by-side
  • Inline
@@ -177,6 +177,11 @@ class ScheduledTransitionAddForm extends ContentEntityForm {
if (is_numeric($revision) && $revision > 0) {
$entityStorage = $this->entityTypeManager->getStorage($entity->getEntityTypeId());
$entityRevision = $entityStorage->loadRevision($revision);
// When the entity is translatable, load the translation for the current
// language.
if ($entityRevision instanceof TranslatableInterface && $entityRevision->isTranslatable()) {
$entityRevision = $entityRevision->getTranslation($this->languageManager->getCurrentLanguage(LanguageInterface::TYPE_CONTENT)->getId());
}
$toTransitions = $this->stateTransitionValidation
->getValidTransitions($entityRevision, $this->currentUser());
}
Loading