From 84c5228d4507598a1ff1aeb52b4e3668f6ae8b13 Mon Sep 17 00:00:00 2001
From: Michael Moritz <miiimooo@users.noreply.github.com>
Date: Wed, 16 Apr 2025 14:43:11 +0200
Subject: [PATCH] Issue #3519447: Cannot translate paragraph entity (in
 entity_embed in ckeditor5)

---
 .../src/ContentTranslationMetadataWrapper.php                 | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/core/modules/content_translation/src/ContentTranslationMetadataWrapper.php b/core/modules/content_translation/src/ContentTranslationMetadataWrapper.php
index 76c3d2ddd4bd..1fd07c59c229 100644
--- a/core/modules/content_translation/src/ContentTranslationMetadataWrapper.php
+++ b/core/modules/content_translation/src/ContentTranslationMetadataWrapper.php
@@ -79,7 +79,9 @@ public function getAuthor() {
    */
   public function setAuthor(UserInterface $account) {
     $field_name = $this->translation->hasField('content_translation_uid') ? 'content_translation_uid' : 'uid';
-    $this->setFieldOnlyIfTranslatable($field_name, $account->id());
+    if ($this->translation->hasField($field_name)) {
+      $this->setFieldOnlyIfTranslatable($field_name, $account->id());
+    }
     return $this;
   }
 
-- 
GitLab