AI Automators CKEditor plugin is broken
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3528446. -->
Reported by: [marcus_johansson](https://www.drupal.org/user/385947)
Related to !655
>>>
<h3 id="summary-problem-motivation">Problem/Motivation</h3>
<p>Setup a job and run - it looks weird and you get:</p>
<p>The website encountered an unexpected error. Try again later.<br><br>
<br><br>
<em class="placeholder">InvalidArgumentException</em><br>
: Field selected_text is unknown. in <em class="placeholder">Drupal\Core\Entity\ContentEntityBase->getTranslatedField()</em><br>
(line <em class="placeholder">617</em><br>
of <em class="placeholder">core/lib/Drupal/Core/Entity/ContentEntityBase.php</em><br>
). </p>
<pre class="backtrace">Drupal\Core\Entity\ContentEntityBase->get() (Line: 658)
Drupal\Core\Entity\ContentEntityBase->set() (Line: 147)
Drupal\ai_automators\Service\Automate->run() (Line: 418)
Drupal\ai_automators\Plugin\AICKEditor\AiAutomatorsCKEditor->ajaxGenerate()
call_user_func_array() (Line: 69)
Drupal\Core\Form\FormAjaxResponseBuilder->buildResponse() (Line: 112)
Drupal\Core\Form\EventSubscriber\FormAjaxSubscriber->onException() (Line: 246)
Symfony\Component\EventDispatcher\EventDispatcher::Symfony\Component\EventDispatcher\{closure}() (Line: 206)
Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (Line: 56)
Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (Line: 241)
Symfony\Component\HttpKernel\HttpKernel->handleThrowable() (Line: 91)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 53)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle() (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle() (Line: 116)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 90)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 53)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 715)
Drupal\Core\DrupalKernel->handle() (Line: 19)
</pre><h4 id="summary-steps-reproduce">Steps to reproduce</h4>
<h3 id="summary-proposed-resolution">Proposed resolution</h3>
<p>Fix so it works again.</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>
> Related issue: [Issue #3528065](https://www.drupal.org/node/3528065)
issue