Clone of https://www.drupal.org/project/search_api/issues/2882347:
"
While editing a existing server a LogicException is thrown when I try to change between the "Basic Auth" and the "Standard" Solr Connector.

"A fatal error occurred: 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."
"

This happens when using:
Search API Solr | 8.x-1.10
Search API | 8.x-1.19
Drupal Core 8.9.13

I was able to reproduce on work and personal laptop by:
1. Install and enable Search API 8.x-1.19 and Search API Solr 8.x-1.10
2. From Admin UI, go to Config -> Search and Metadata -> Search API
3. Add a server, fill in required fills, save. Note: The bug is not present on initial add of server. You can switch connectors.
4. Now Edit the newly created server.
5. Try to switch the Solr Connector between Basic Auth and Standard.
6. Notice that the form does not update with the connector you select
7. You can see the exception with the fatal error above thrown by going to recent log messages (Reports -> Recent log messages).

CommentFileSizeAuthor
#7 3207297.patch845 bytesmkalkbrenner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bruce.yuen created an issue. See original summary.

mkalkbrenner’s picture

Which Drupal Core version are you using?

bruce.yuen’s picture

@mkalkbrenner This is happening to me on Drupal 8.9.13.

bruce.yuen’s picture

Issue summary: View changes
DamienMcKenna’s picture

I've just hit this problem myself switching between the Pantheon and Standard connectors :-\

mkalkbrenner’s picture

Version: 8.x-1.10 » 8.x-1.x-dev
Status: Active » Patch (to be ported)

This issue is already fixed in 4.x.

mkalkbrenner’s picture

Priority: Normal » Major
Status: Patch (to be ported) » Needs review
FileSize
845 bytes

  • mkalkbrenner committed ed06ab5 on 8.x-1.x
    Issue #3207297 by mkalkbrenner, bruce.yuen, DamienMcKenna: Serialization...
mkalkbrenner’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.