Automator Base Field is confusing on Media Image and fails silently with invalid field selections
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3581811. --> Reported by: [cadence96](https://www.drupal.org/user/3520894) Related to !1362 >>> <p>[Tracker]<br> Update Summary: Automator Base Field can be misleading on media image entities and may fail silently with invalid selections.<br> Short Description: The Automator Base Field selector exposes unclear/invalid options and does not show a validation error when no usable source field is found.<br> Check-in Date: 03/26/2026<br> [/Tracker]</p> <h3 id="problem-motivation">Problem/Motivation</h3> <p>When adding an automator to a field on a content type, the <code>Automator Base Field</code> options are relatively intuitive because they show labels such as <code>Title</code> or <code>Body</code>, which clearly represent the available source fields.</p> <p><img width="500" height="485" src="https://www.drupal.org/files/issues/2026-03-26/automators-content-type.png" alt="Image that shows the Automator Base Field select options from Content Type Article."></p> <p>However, when adding an automator to a field on the <code>Media: Image</code> bundle, the <code>Automator Base Field</code> selector becomes confusing. In that case, the available option may only be <code>Name</code>, which does not clearly refer to the actual image field and does not help new users understand what field will be used as the automator input.</p> <p><img width="500" height="489" src="https://www.drupal.org/files/issues/2026-03-26/automators-media-image.png" alt="Image that shows the Automator Base Field select options from Media Image."></p> <p>Additionally, the selector may also expose <code>Revision log message</code>. If that option is selected by mistake, the automator fails without showing any useful error message. From the user perspective, it is not clear what went wrong, and there is no indication that the selected base field did not provide a usable source field for the automator.</p> <p><img width="500" height="426" src="https://www.drupal.org/files/issues/2026-03-26/automator-no-notification.gif" alt="Automator error without notification"></p> <p>This creates two UX and reliability problems:</p> <ol> <li>The base field options are not always clear enough to understand which field is actually being used as input.</li> <li>An invalid or unusable selection can lead to a silent failure without feedback.</li> </ol> <p>This is especially confusing for first-time users trying to understand how <code>ai_automators</code> expects the input field to be configured.</p> <h3 id="steps-to-reproduce">Steps to reproduce</h3> <ol> <li>Install and enable <code>ai_automators</code> and <code>field_widget_actions</code>.</li> <li>Go to <code>/admin/structure/types/manage/article/fields</code>.</li> <li>Add an automator to one of its fields and open the <code>Automator Base Field</code> selector.</li> <li>Observe that the options are relatively intuitive because they match the labels of the available fields.</li> <li>Create or use the <code>Media: Image</code> bundle.</li> <li>Add an automator to a field on that bundle and open the <code>Automator Base Field</code> selector.</li> <li>Observe that the available option may only be <code>Name</code>, which does not clearly point to the image field.</li> <li>Select <code>Revision log message</code> as the <code>Automator Base Field</code>.</li> <li>Try to run/save/use the automator.</li> <li>Observe that the automator fails without a helpful validation or runtime error message explaining that no valid source field was found.</li> </ol> <h3 id="current-result">Current result</h3> <ol> <li>On some entity bundles, the <code>Automator Base Field</code> options are ambiguous and do not clearly identify the intended source field.</li> <li><code>Revision log message</code> can appear as a selectable option even though it is not a meaningful automator source field in this scenario.</li> <li>If such an option is selected, the automator may fail silently without displaying a clear error message.</li> </ol> <h3 id="expected-result">Expected result</h3> <ol> <li>The <code>Automator Base Field</code> selector should display options in a way that clearly identifies the actual usable source field.</li> <li>Fields that are not valid or meaningful as automator source fields, such as <code>Revision log message</code>, should be excluded or clearly marked as unsupported.</li> <li>If no valid source field can be resolved from the selected option, the module should show a clear validation or status message explaining the problem instead of failing silently.</li> </ol> <h3 id="proposed-resolution">Proposed resolution</h3> <ol> <li>Review how <code>Automator Base Field</code> options are built for different entity bundles, especially <code>Media: Image</code>.</li> <li>Use labels that better communicate the actual source field being used.</li> <li>Exclude administrative fields such as <code>Revision log message</code> when they are not valid as automator input sources.</li> <li>Add validation and/or runtime feedback when the selected base field does not resolve to a usable source field.</li> </ol> <h3 id="why-this-matters">Why this matters</h3> <ol> <li>It improves the onboarding experience for new users.</li> <li>It reduces trial-and-error during automator setup.</li> <li>It prevents silent failures and makes configuration problems easier to debug.</li> </ol> <h3 id="remaining-tasks">Remaining tasks</h3> <ol> <li>Verify how the base field list is generated for content entities versus media entities.</li> <li>Define which fields should be excluded from the selector.</li> <li>Add validation or error messaging when no usable field can be resolved.</li> <li>Test with content types and media bundles, including <code>Media: Image</code>.</li> </ol> <h3 id="summary-ai-usage">AI usage (if applicable)</h3> <p>[x] AI Assisted Issue<br> This issue was generated with AI assistance, but was reviewed and refined by the creator.</p> <p>[ ] AI Assisted Code<br> This code was mainly generated by a human, with AI autocompleting or parts AI generated, but under full human supervision.</p> <p>[ ] AI Generated Code<br> This code was mainly generated by an AI with human guidance, and reviewed, tested, and refined by a human.</p> <p>[ ] Vibe Coded<br> This code was generated by an AI and has only been functionally tested.</p>
issue