LogicException when adding new image field and selecting OpenAi as AI provider

Created on 17 November 2024, 5 days ago

Problem/Motivation

Hi,

I'm no longer able to select OpenAI as the AI provider on newly created image fields.

The watchdog shows:

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/***/core/lib/Drupal/Core/Database/Connection.php).

Steps to reproduce

- Create a new image field (in my case on Taxonomy term entity)
- Under "Advanced" select "OpenAI" as the AI provider.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

AI Automators

Created by

🇹🇭Thailand AlfTheCat

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

Comments & Activities

  • Issue created by @AlfTheCat
  • 🇩🇪Germany marcus_johansson

    I can't replicate this, coudl you please provide more information, I have tried without and with having default complex json provider.

    Does OpenAI work in the AI API Explorer?

  • 🇹🇭Thailand AlfTheCat

    Hi Marcus,

    In the explorer image generation is working.

    I'm experiencing this with a newly created image field on a taxonomy term. I don't get the settings form as you can see in the screenshot I attached. On pre-existing fields the settings form does render. Image generation on those existing fields is working.

Production build 0.71.5 2024