Translation seems to affect workflow
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3472755. -->
Reported by: [briwan](https://www.drupal.org/user/3829967)
>>>
<h3 id="summary-problem-motivation">Error when using Translate with AI button</h3>
<h4 id="summary-steps-reproduce">Create a content in english, translate them with the AI button, an error occured, drupal try to save a translated workflow and crash. In screenshot we can see "publié" for french and "publicado" for spanish.</h4>
<p>Backtrace<br>
#0 /var/www/html/web/core/modules/content_moderation/src/Plugin/WorkflowType/ContentModeration.php(101): Drupal\workflows\Plugin\WorkflowTypeBase->getState()<br>
#1 /var/www/html/web/core/modules/content_moderation/src/EntityOperations.php(114): Drupal\content_moderation\Plugin\WorkflowType\ContentModeration->getState()<br>
#2 /var/www/html/web/core/modules/content_moderation/content_moderation.module(102): Drupal\content_moderation\EntityOperations->entityPresave()<br>
#3 [internal function]: content_moderation_entity_presave()<br>
#4 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(416): call_user_func_array()<br>
#5 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(395): Drupal\Core\Extension\ModuleHandler->Drupal\Core\Extension\{closure}()<br>
#6 /var/www/html/web/core/lib/Drupal/Core/Extension/ModuleHandler.php(415): Drupal\Core\Extension\ModuleHandler->invokeAllWith()<br>
#7 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(217): Drupal\Core\Extension\ModuleHandler->invokeAll()<br>
#8 /var/www/html/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(900): Drupal\Core\Entity\EntityStorageBase->invokeHook()<br>
#9 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(529): Drupal\Core\Entity\ContentEntityStorageBase->invokeHook()<br>
#10 /var/www/html/web/core/lib/Drupal/Core/Entity/ContentEntityStorageBase.php(753): Drupal\Core\Entity\EntityStorageBase->doPreSave()<br>
#11 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityStorageBase.php(483): Drupal\Core\Entity\ContentEntityStorageBase->doPreSave()<br>
#12 /var/www/html/web/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php(806): Drupal\Core\Entity\EntityStorageBase->save()<br>
#13 /var/www/html/web/core/lib/Drupal/Core/Entity/EntityBase.php(354): Drupal\Core\Entity\Sql\SqlContentEntityStorage->save()<br>
#14 /var/www/html/web/modules/contrib/ai/modules/ai_translate/src/Controller/AiTranslateController.php(249): Drupal\Core\Entity\EntityBase->save()<br>
#15 /var/www/html/web/modules/contrib/ai/modules/ai_translate/src/Controller/AiTranslateController.php(142): Drupal\ai_translate\Controller\AiTranslateController->insertTranslation()<br>
#16 [internal function]: Drupal\ai_translate\Controller\AiTranslateController->translate()<br>
#17 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()<br>
#18 /var/www/html/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()<br>
#19 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()<br>
#20 /var/www/html/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()<br>
#21 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()<br>
#22 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()<br>
#23 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()<br>
#24 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()<br>
#25 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()<br>
#26 /var/www/html/web/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()<br>
#27 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()<br>
#28 /var/www/html/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()<br>
#29 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()<br>
#30 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()<br>
#31 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()<br>
#32 /var/www/html/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()<br>
#33 /var/www/html/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()<br>
#34 /var/www/html/web/index.php(19): Drupal\Core\DrupalKernel->handle()<br>
#35 {main}</p>
<p>Regards,</p>
issue