Implicit and unneeded dependency on core's image.module
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3525188. --> Reported by: [boobaa](https://www.drupal.org/user/199303) Related to !613 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>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.</p> <h4 id="summary-steps-reproduce">Steps to reproduce</h4> <p>Have a site without core's image.field enabled.<br> Add an AI Provider that supports image vision (eg. Google Vertex).<br> Enable AI Automator on any field.<br> Instead of the "Default Advanced JSON model", select the above AI Provider.</p> <p>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).</p> <p>Actual behavior: an exception is thrown: <code>Drupal\Component\Plugin\Exception\PluginNotFoundException: The "image_style" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager-&gt;getDefinition() (line 142 of /var/www/html/web/core/lib/Drupal/Core/Entity/EntityTypeManager.php).</code> Even without saving this field's settings, there's no way to open these settings anymore.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>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).</p> <h3 id="summary-remaining-tasks">Remaining tasks</h3> <p>Discuss, patch, commit, release.</p> <h3 id="summary-ui-changes">User interface changes</h3> <p>None, or removing that "Image field" dropdown when core's image.module is not enabled.</p> <h3 id="summary-api-changes">API changes</h3> <p>None.</p> <h3 id="summary-data-model-changes">Data model changes</h3> <p>None.</p>
issue