saving a search_api solr index of External Entities results in connection not serializable error

Created on 19 September 2023, over 1 year ago

Problem/Motivation

Steps to reproduce
1) installing external entities
2) install and configure search_api_solr
3) create /edit a search index of external entities
4) save the configuration in step 3
a) get exception as noted below
b) edit an external entities display mode, save without changing
c) refresh the posted data in step 3 above by pressing CTRL-F5 on browser with the error page shown in step 3
d) result is the error in step 3 goes away.

5) repeat steps 3 through 4.

Why?

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 2042 of core/lib/Drupal/Core/Database/Connection.php).
serialize() (Line: 157)
Drupal\Core\Batch\BatchStorage->doCreate() (Line: 141)
Drupal\Core\Batch\BatchStorage->create() (Line: 107)
Drupal\Core\ProxyClass\Batch\BatchStorage->create() (Line: 934)
batch_process() (Line: 63)
Drupal\Core\Form\FormSubmitter->doSubmitForm() (Line: 595)
Drupal\Core\Form\FormBuilder->processForm() (Line: 323)
Drupal\Core\Form\FormBuilder->buildForm() (Line: 73)
Drupal\Core\Controller\FormController->getContentResult() (Line: 39)
Drupal\layout_builder\Controller\LayoutBuilderHtmlEntityFormController->getContentResult()

Steps to reproduce

See issue summary

Proposed resolution

TBD

Remaining tasks

TBD

User interface changes

TBD

API changes

TBD

Data model changes

TBD

💬 Support request
Status

Active

Version

2.0

Component

Code

Created by

🇨🇦Canada joseph.olstad

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

Comments & Activities

Production build 0.71.5 2024