Ajax error when adding taxonomie reference field

Created on 9 September 2024, 3 months ago

Problem/Motivation

When adding a taxonomy reference field and choosing the vocabulary in the form, the ajax symbol appears and then the save button becomes gray with no function.
From the logs:
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 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/Database/Connection.php).

#0 [internal function]: Drupal\Core\Database\Connection->__sleep()
#1 /var/www/vhosts/example.com/web/core/lib/Drupal/Component/Serialization/PhpSerialize.php(14): serialize()
#2 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php(129): Drupal\Component\Serialization\PhpSerialize::encode()
#3 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/KeyValueStore/DatabaseStorageExpirable.php(145): Drupal\Core\KeyValueStore\DatabaseStorageExpirable->doSetWithExpire()
#4 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/Form/FormCache.php(193): Drupal\Core\KeyValueStore\DatabaseStorageExpirable->setWithExpire()
#5 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/Form/FormBuilder.php(463): Drupal\Core\Form\FormCache->setCache()
#6 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/Form/FormBuilder.php(441): Drupal\Core\Form\FormBuilder->setCache()
#7 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/Form/FormBuilder.php(633): Drupal\Core\Form\FormBuilder->rebuildForm()
#8 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/Form/FormBuilder.php(326): Drupal\Core\Form\FormBuilder->processForm()
#9 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/Entity/EntityFormBuilder.php(48): Drupal\Core\Form\FormBuilder->buildForm()
#10 /var/www/vhosts/example.com/web/core/modules/field_ui/src/Controller/FieldConfigAddController.php(62): Drupal\Core\Entity\EntityFormBuilder->getForm()
#11 [internal function]: Drupal\field_ui\Controller\FieldConfigAddController->fieldConfigAddConfigureForm()
#12 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#13 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#14 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#15 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#16 /var/www/vhosts/ example.comvendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#17 /var/www/vhosts/ example.comvendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#18 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#19 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#20 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#21 /var/www/vhosts/example.com/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\Core\StackMiddleware\ContentLength->handle()
#22 /var/www/vhosts/example.com/web/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#23 /var/www/vhosts/example.com/web/modules/contrib/services/src/StackMiddleware/FormatSetter.php(45): Drupal\page_cache\StackMiddleware\PageCache->handle()
#24 /var/www/vhosts/example.com/web/core/modules/ban/src/BanMiddleware.php(50): Drupal\services\StackMiddleware\FormatSetter->handle()
#25 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\ban\BanMiddleware->handle()
#26 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#27 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#28 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#29 /var/www/vhosts/example.com/web/core/lib/Drupal/Core/DrupalKernel.php(741): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#30 /var/www/vhosts/example.com/web/index.php(19): Drupal\Core\DrupalKernel->handle()
#31 {main}

Steps to reproduce

Drupal 10.3.3
php 8.3.11

Proposed resolution

I don't know. As far as I can see, it appeared after upgrading from 10.3.2

πŸ› Bug report
Status

Active

Version

10.3 ✨

Component
TaxonomyΒ  β†’

Last updated 2 days ago

  • Maintained by
  • πŸ‡ΊπŸ‡ΈUnited States @xjm
  • πŸ‡¬πŸ‡§United Kingdom @catch
Created by

πŸ‡©πŸ‡ͺGermany Umac_de

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024