Feeds Save and import button missing when sticky action buttons setting enabled

Created on 5 March 2025, 4 months ago

Problem/Motivation

Note: Not sure if this is a bug or a support request.

When the "Enable sticky action buttons" setting is enabled in Gin settings, the Feeds module's Save and import button goes missing. Per Gin's documentation , I added the following to one of my custom modules' form_alter hooks:

if (isset($form['actions']['import'])) {
  $form['actions']['import']['#gin_action_item'] = TRUE;
}

Unfortunately that didn't work, so I've disabled the "Enable sticky action buttons" setting for now.

Steps to reproduce

  1. Enable the Gin theme and set it as the default admin theme. Leave the "Enable sticky action buttons" setting disabled.
  2. Enable the Feeds module.
  3. Create a feed type.
  4. Add a feed of the type you just created. The form action buttons: Save and import and Cancel, will be visible at the bottom of the form.
  5. Don't save the feed. Instead, go to the Gin theme's settings page and enable the "Enable sticky action buttons" setting.
  6. Go back to the Add feed page. The form action buttons will no longer be at the bottom of the form. In the Gin sticky actions menu, the Cancel button is available behind the More actions button. But, the Save and import button will not be visible.
  7. In a custom module's hook_form_alter hook, add the following, which should make the Save and import button visible in the sticky actions menu:
    if (isset($form['actions']['import'])) {
      $form['actions']['import']['#gin_action_item'] = TRUE;
    }
    
  8. Refresh the Add feed page. The Save and import button will still not be visible.
💬 Support request
Status

Active

Version

4.0

Component

User interface

Created by

🇺🇸United States jsutta United States

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

Comments & Activities

  • Issue created by @jsutta
  • 🇺🇸United States jsutta United States
  • 🇮🇳India divyansh.gupta Jaipur

    Working on it.

  • 🇮🇳India divyansh.gupta Jaipur

    @jsutta,
    I am unable to see the sticky action buttons menu even after enabling the setting in theme's setting form, so can you help me how to make the menu visible.

  • 🇺🇸United States jeffschuler Boulder, Colorado

    I'm reposting here @paulguy's patch from #18 on 🐛 Cannot opt out buttons using #gin_action_item = TRUE Active that addresses this.

    As @paulguy says there:

    '#gin_action_item' only applies on '#type' == 'submit' elements inside 'actions' container. It used to work on any types before rc14, like the 'delete' modal link.

    Here is a patch that applies the same logic to all other types in the else statement.

    This patch is working for me.

    @jsutta & @divyansh.gupta: does this fix the issue for you?

  • 🇺🇸United States jsutta United States

    Hi @jeffschuler, thank you for getting back to me. I just checked it out and the patch worked like a charm for me.

  • 🇳🇱Netherlands bond708 Groningen

    @jeffschuler, I ran against it today when adding media style. This fixed it. Thank you.

  • 🇩🇪Germany harkonn

    I tested the patch from #5 and while being visible in the sticky menu now clicking the buttons "Save and Import" or "Save" doesn't do anything.

    Core: 10.4.6
    Gin: 4.0.6
    Feeds: 3.0.0

  • Status changed to Needs work about 2 months ago
  • 🇺🇸United States socalerich

    I have the same issue as harkonn. Buttons show now, but nothing happens when you click them.

    Core: 10.4.7
    Gin: 4.0.6
    Feeds: 8.x-3.0

Production build 0.71.5 2024