Undefined array key "tone_prompt" in Drupal\ai_content_suggestions\Plugin\AiContentSuggestions\Tone->saveSettingsForm()
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3529089. --> Reported by: [anjaliprasannan](https://www.drupal.org/user/3637917) Related to !663 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Getting the below error on submitting the content suggestion settings form.</p> <pre>Error message<br>Warning: Undefined array key "tone_prompt" in Drupal\ai_content_suggestions\Plugin\AiContentSuggestions\Tone-&gt;saveSettingsForm() (line 263 of modules/contrib/ai/modules/ai_content_suggestions/src/Plugin/AiContentSuggestions/Tone.php).<br>Drupal\ai_content_suggestions\Plugin\AiContentSuggestions\Tone-&gt;saveSettingsForm() (Line: 124)<br>Drupal\ai_content_suggestions\Form\SettingsForm-&gt;submitForm()<br>call_user_func_array() (Line: 105)<br>Drupal\Core\Form\FormSubmitter-&gt;executeSubmitHandlers() (Line: 43)<br>Drupal\Core\Form\FormSubmitter-&gt;doSubmitForm() (Line: 589)<br>Drupal\Core\Form\FormBuilder-&gt;processForm() (Line: 321)<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: 623)<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: 183)<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: 48)<br>Drupal\Core\StackMiddleware\ReverseProxyMiddleware-&gt;handle() (Line: 51)<br>Drupal\Core\StackMiddleware\NegotiationMiddleware-&gt;handle() (Line: 53)<br>Drupal\Core\StackMiddleware\AjaxPageState-&gt;handle() (Line: 51)<br>Drupal\Core\StackMiddleware\StackedHttpKernel-&gt;handle() (Line: 715)<br>Drupal\Core\DrupalKernel-&gt;handle() (Line: 19)</pre><h4 id="summary-steps-reproduce">Steps to reproduce</h4> <ul> <li>Enable ai content suggestion module </li> <li>Go to /admin/config/ai/suggestions</li> <li>Enable any of the content suggestion and submit the form</li> </ul> <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