I assume it is an interference with some other module installed.
@jbuttler can you share the list of installed/enabled modules (core.extension.yml in config export), or at least your composer.json?
Yes, this is consistently replicable for the Dev version as well:
The website encountered an unexpected error. Try again later.
LogicException: The database connection is not serializable. This probably means you are serializing an object that has an indirect reference to the database connection. Adjust your code so that is not necessary. Alternatively, look at DependencySerializationTrait as a temporary solution. in Drupal\Core\Database\Connection->__sleep() (line 1920 of core/lib/Drupal/Core/Database/Connection.php).
serialize() (Line: 14)
Drupal\Component\Serialization\PhpSerialize::encode() (Line: 129)
Drupal\Core\KeyValueStore\DatabaseStorageExpirable->doSetWithExpire() (Line: 145)
Drupal\Core\KeyValueStore\DatabaseStorageExpirable->setWithExpire() (Line: 193)
Drupal\Core\Form\FormCache->setCache() (Line: 463)
Drupal\Core\Form\FormBuilder->setCache() (Line: 441)
Drupal\Core\Form\FormBuilder->rebuildForm() (Line: 633)
Drupal\Core\Form\FormBuilder->processForm() (Line: 326)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)
After some digging I disabled PHP's zend.assertions in local environment to uncloak the error and now getting:
The website encountered an unexpected error. Try again later.
LogicException: The database connection is not serializable. This probably means you are serializing an object that has an indirect reference to the database connection. Adjust your code so that is not necessary. Alternatively, look at DependencySerializationTrait as a temporary solution. in Drupal\Core\Database\Connection->__sleep() (line 1920 of core/lib/Drupal/Core/Database/Connection.php).
serialize() (Line: 14)
Drupal\Component\Serialization\PhpSerialize::encode() (Line: 129)
Drupal\Core\KeyValueStore\DatabaseStorageExpirable->doSetWithExpire() (Line: 145)
Drupal\Core\KeyValueStore\DatabaseStorageExpirable->setWithExpire() (Line: 193)
Drupal\Core\Form\FormCache->setCache() (Line: 463)
Drupal\Core\Form\FormBuilder->setCache() (Line: 441)
Drupal\Core\Form\FormBuilder->rebuildForm() (Line: 633)
Drupal\Core\Form\FormBuilder->processForm() (Line: 326)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 76)
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: 106)
Drupal\page_cache\StackMiddleware\PageCache->pass() (Line: 85)
Drupal\page_cache\StackMiddleware\PageCache->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle() (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle() (Line: 741)
Drupal\Core\DrupalKernel->handle() (Line: 19)
@kevinquillen, yes we do use all those modules - it is a shared codebase for all sites my organization is managing through the Acquia Site Factory.
But what I can attest for is that the same WYSIWYG editor has other plugins utilizing ajax form submissions (Linkit, Media library, custom plugins) which are working just fine.
Any suggestions how I can debug the issue locally?
Sure:
AI provider: OpenAI
Drupal: 10.3.5
Composer.json: https://dev.azure.com/undp-online-digital/Acquia/_git/Acquia?version=GBf...
Installed AI submodules modules (from core.extension):
ai
ai_api_explorer
ai_assistant_api
ai_chatbot
ai_ckeditor
ai_content
ai_logging
ai_translate
We are getting the same result with the text editor outside of the Site Studio (body field)
jura.khrapunov β created an issue.
Updated patch
It is also happening when using image upload form in Image field invoking Media Library widget enhanced by dropzone.js .
Community support matters, please reinstate the banner
jura.khrapunov β created an issue.
jura.khrapunov β created an issue.
jura.khrapunov β created an issue.