The save button is missing for the media directories forms.

Created on 14 August 2024, about 1 month ago
Updated 29 August 2024, 18 days ago

It seems like the media directories forms were broken. The save button is missing when "Enable sticky action buttons" is enabled.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇺🇦Ukraine anton4uk

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

Comments & Activities

  • Issue created by @anton4uk
  • Status changed to Needs review about 1 month ago
  • 🇮🇳India Kanchan Bhogade

    Hi @anton4uk
    I've tried to reproduce the issue on Drupal 10 and Drupal 11,
    able to see the "Save" button on the Media Directories form.
    Attaching SS for reference

    please share the detailed steps to reproduce the issue

  • Status changed to Needs work 27 days ago
  • #3 not able to reproduce the issue so i tagging for STR.

  • Status changed to Active 19 days ago
  • 🇨🇭Switzerland saschaeggi Zurich

    @Kanchan Bhogade you seem to test in Claro and not Gin

    Also the steps are clearly stated in the description, so moving this back to active

  • 🇩🇪Germany jurgenhaas Gottmadingen

    I've updated the MR in 🐛 Ensure sticky action buttons to work with modals and ajax refresh-calls Needs review with great results. Even the media directories action buttons are now visible.

    However, there is an issue with the media_directories_add_form form, which is implemented as a modal over a modal. The problem is that the second level modal uses the ajax wrapper where it should be using the drupal_modal wrapper in the ajax request to receive that second form. If you have any chance to change that query argument, this should be resolved too.

    Only if that doesn't work at all, a workaround would be to add the following exception at the beginning of gin_form_alter:

      // Don't unset actions for media_directories forms.
      if (str_contains($form['#form_id'], 'media_directories_add_form')) {
        return;
      }
    

    However, using the correct wrapper during the request would be much preferred as this would also prevent potential other side effects in the future, not only those with Gin but also with Drupal core.

Production build 0.71.5 2024