AI Translate: Compatibility regression with AI TMGMT
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3513409. -->
Reported by: [baikho](https://www.drupal.org/user/2727459)
Related to !516
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>AI TMGMT suggests the following for translations: </p>
<blockquote><p>Use the configuration from the "AI Translate" module (recommended)</p></blockquote>
<p>Having both the <code>ai_tmgmt</code> module and the <code>ai_translate</code> submodule of this module enabled and navigating to <code>/node/{node_id}/translations</code> reproduces the below error.</p>
<p>Happens on both <code>1.0.x-dev</code> and <code>1.1.x-dev</code> of the AI module.</p>
<pre>Warning: Undefined array key "#entity" in Drupal\ai_translate\Form\AiTranslateForm->buildForm() (line 85 of modules/contrib/ai/modules/ai_translate/src/Form/AiTranslateForm.php).<br>Drupal\ai_translate\Form\AiTranslateForm->buildForm()<br>call_user_func_array() (Line: 536)<br>Drupal\Core\Form\FormBuilder->retrieveForm() (Line: 284)<br>Drupal\Core\Form\FormBuilder->buildForm() (Line: 224)<br>Drupal\Core\Form\FormBuilder->getForm() (Line: 50)<br>Drupal\ai_translate\Controller\ContentTranslationControllerOverride->overview()<br>call_user_func_array() (Line: 123)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)<br>Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)<br>Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)<br>Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)<br>Drupal\Core\StackMiddleware\Session->handle() (Line: 48)<br>Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)<br>Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 116)<br>Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)<br>Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)<br>Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)<br>Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)<br>Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)<br>Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)<br>Drupal\Core\DrupalKernel->handle() (Line: 19)</pre><p>It regressed with changes in <a href="https://git.drupalcode.org/project/ai/-/commit/9c6df49314eff2db72060d27b0367c71746afa35">https://git.drupalcode.org/project/ai/-/commit/9c6df49314eff2db72060d27b0367c71746afa35</a></p>
<h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<p>1. Install <code>ai_tmgmt</code> module, <code>tmgmt_content</code> and this module's <code>ai_translate</code> submodule<br>
2. Attempt to translate a node in the GUI<br>
3. Error reproduces, no translation interface is shown</p>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Re-introduce compatibility or state incompatibility.</p>
<h3 id="summary-remaining-tasks">Remaining tasks</h3>
<h3 id="summary-ui-changes">User interface changes</h3>
<h3 id="summary-api-changes">API changes</h3>
<h3 id="summary-data-model-changes">Data model changes</h3>
issue