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-&gt;buildForm() (line 85 of modules/contrib/ai/modules/ai_translate/src/Form/AiTranslateForm.php).<br>Drupal\ai_translate\Form\AiTranslateForm-&gt;buildForm()<br>call_user_func_array() (Line: 536)<br>Drupal\Core\Form\FormBuilder-&gt;retrieveForm() (Line: 284)<br>Drupal\Core\Form\FormBuilder-&gt;buildForm() (Line: 224)<br>Drupal\Core\Form\FormBuilder-&gt;getForm() (Line: 50)<br>Drupal\ai_translate\Controller\ContentTranslationControllerOverride-&gt;overview()<br>call_user_func_array() (Line: 123)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 638)<br>Drupal\Core\Render\Renderer-&gt;executeInRenderContext() (Line: 121)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;wrapControllerExecutionInRenderContext() (Line: 97)<br>Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber-&gt;Drupal\Core\EventSubscriber\{closure}() (Line: 181)<br>Symfony\Component\HttpKernel\HttpKernel-&gt;handleRaw() (Line: 76)<br>Symfony\Component\HttpKernel\HttpKernel-&gt;handle() (Line: 53)<br>Drupal\Core\StackMiddleware\Session-&gt;handle() (Line: 48)<br>Drupal\Core\StackMiddleware\KernelPreHandle-&gt;handle() (Line: 28)<br>Drupal\Core\StackMiddleware\ContentLength-&gt;handle() (Line: 116)<br>Drupal\page_cache\StackMiddleware\PageCache-&gt;pass() (Line: 90)<br>Drupal\page_cache\StackMiddleware\PageCache-&gt;handle() (Line: 48)<br>Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle() (Line: 51)<br>Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle() (Line: 36)<br>Drupal\Core\StackMiddleware\AjaxPageState-&gt;handle() (Line: 51)<br>Drupal\Core\StackMiddleware\StackedHttpKernel-&gt;handle() (Line: 741)<br>Drupal\Core\DrupalKernel-&gt;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