AI Content Suggestions Settings warning
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3507593. --> Reported by: [srees](https://www.drupal.org/user/2251056) Related to !470 !473 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>The settings form for content suggestions (/admin/config/ai/suggestions) is generating a warning. I'm experiencing other issues with content suggestions as well which I'll generate a separate ticket for. I thought this one could be ignored, but in case it's related I'll go ahead with this ticket.</p> <blockquote><p>Warning: Trying to access array offset on null in Drupal\ai_content_suggestions\Form\SettingsForm-&gt;submitForm() (line 97 of modules/contrib/ai/modules/ai_content_suggestions/src/Form/SettingsForm.php).</p></blockquote> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>We are running a complex multi-site with quite a number of modules and some custom content types as well. I recognize our full environment cannot be duplicated. As far as AI is, we've enabled AI Core, AI CKEditor integration, AI Content Suggestions, Microsoft Azure AI. Setup everything so that CKEditor is working fine with the AI integrations.<br> When I go to the config page for suggestions, I enable each box, set the model we've configured (no taxonomy for tone) and save, producing the error above. Here is the backtrace:</p> <blockquote><p>Drupal\ai_content_suggestions\Form\SettingsForm-&gt;submitForm()<br> call_user_func_array() (Line: 129)<br> Drupal\Core\Form\FormSubmitter-&gt;executeSubmitHandlers() (Line: 67)<br> Drupal\Core\Form\FormSubmitter-&gt;doSubmitForm() (Line: 597)<br> Drupal\Core\Form\FormBuilder-&gt;processForm() (Line: 326)<br> Drupal\Core\Form\FormBuilder-&gt;buildForm() (Line: 73)<br> Drupal\Core\Controller\FormController-&gt;getContentResult()<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: 32)<br> Drupal\big_pipe\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: 50)<br> Drupal\ban\BanMiddleware-&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)</p></blockquote> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <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