Default option for Media type can be wrong if not selected in Ai Automator Advanced settings

Created on 10 January 2025, 12 days ago

Problem/Motivation

The Ai Automator Advanced settings field `Media type` defaults to `Audio` if the user does not select an option.

Steps to reproduce

Enable the AI Automator on an image field. Navigate to advanced and see the Media type dropdown. Upon saving it will be saved as audio if nothing is selected.

Proposed resolution

Add a `- Please select -' option to the list and validate the value on submit.

🐛 Bug report
Status

Active

Version

1.0

Component

AI Automators

Created by

🇬🇧United Kingdom unqunq

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

Merge Requests

Comments & Activities

  • Issue created by @unqunq
  • 🇬🇧United Kingdom unqunq
  • Merge request !396Add empty option to media file type. → (Merged) created by unqunq
  • Pipeline finished with Success
    12 days ago
    Total: 165s
    #392532
  • Pipeline finished with Success
    9 days ago
    Total: 172s
    #394507
  • 🇬🇧United Kingdom MrDaleSmith

    Looks good :)

  • Pipeline finished with Success
    5 days ago
    Total: 185s
    #398495
  • 🇬🇧United Kingdom unqunq

    I had a bit more left to do on this so I added it this morning. Would you be kind to test again?

  • Pipeline finished with Failed
    5 days ago
    Total: 186s
    #398498
  • 🇬🇧United Kingdom unqunq
  • 🇬🇧United Kingdom MrDaleSmith

    You've got failing PCS issues, and I personally don't like the idea of the permission change: this means that a menu item where you can't do anything will appear in your admin menu. I appreciate that's so you can show the message on the page, and that the maintainers may decide that's a better UX. Have you checked whether that custom access check is being used anywhere else? Because if it isn't, the code probably wants removing as well.

  • 🇬🇧United Kingdom unqunq

    I think that not seeing the menu item and therefore not displaying the message will not help users understand that a model needs to be added. Maybe the maintainers can add their view on this as well.

    The access check class might not be used elsewhere indeed so I can remove it as well once we get the confirmation that this is the way to go.

  • 🇬🇧United Kingdom MrDaleSmith

    Actually - the changes you're making don't appear to relate to the description of this ticket, and are duplicating work in https://www.drupal.org/project/ai/issues/3499412 📌 Make selection of AI Provider clearer on module homepage Active - it might be better to remove them completely so this ticket can be closed and then address the other issue on its ticket.

  • Pipeline finished with Success
    5 days ago
    Total: 201s
    #398821
  • 🇬🇧United Kingdom unqunq
  • 🇬🇧United Kingdom MrDaleSmith

    We're back to "looks good to me" :)

  • 🇬🇧United Kingdom unqunq

    Trying to do things in a rush this morning before work (and before coffee ;)...
    Let's merge this one.

  • 🇩🇪Germany marcus_johansson

    Looks good - merging. Thanks both.

Production build 0.71.5 2024