Implicit and unneeded dependency on core's image.module

Created on 19 May 2025, 16 days ago

Problem/Motivation

When editing the AI automation for any field with an AI Provider/Model that could support image vision on a site that does NOT have core's image.module enabled, an exception is thrown. This not only prevents setting up the automation properly, but even editing the field becomes impossible, even without saving its settings.

Steps to reproduce

Have a site without core's image.field enabled.
Add an AI Provider that supports image vision (eg. Google Vertex).
Enable AI Automator on any field.
Instead of the "Default Advanced JSON model", select the above AI Provider.

Expected behavior: allow setting up this automation, with the only option "No images" in the "Image field" dropdown (or probably even remove that dropdown as it's useless anyway).

Actual behavior: an exception is thrown: Drupal\Component\Plugin\Exception\PluginNotFoundException: The "image_style" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 142 of /var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php). Even without saving this field's settings, there's no way to open these settings anymore.

Proposed resolution

Remove the implicit dependency (the better), or make it explicit (a bit worse, because it is a valid use case to NOT have core's image.module enabled on a site).

Remaining tasks

Discuss, patch, commit, release.

User interface changes

None, or removing that "Image field" dropdown when core's image.module is not enabled.

API changes

None.

Data model changes

None.

🐛 Bug report
Status

Active

Version

1.1

Component

AI Automators

Created by

🇭🇺Hungary boobaa

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024