Add actions to sticky header if using gin theme

Created on 25 April 2022, over 2 years ago
Updated 1 August 2023, over 1 year ago

Problem/Motivation

The Gin Admin Theme β†’ (a popular administrative theme) moves action buttons into a special area at the top of the page using the "gin-sticky" class... but that doesn't include moderation workflow buttons because the gin theme uses a special gin_actions container. And so clicking one of those gin actions (Preview, Save, etc.) produces the following error related to the moderation state:

Warning: Undefined array key "#parents" in Drupal\Core\Form\FormState->getError() (line 1112 of core/lib/Drupal/Core/Form/FormState.php).

Proposed resolution

Look for the presence of the gin theme via $form['gin_actions'] and replace the actions array it uses with the actions array produced by this module through processActions().

Remaining tasks

Do it!

User interface changes

None, so long as the "top_buttons" setting isn't TRUE, because the Gin theme actually disrupts the default attaching of submit actions to the bottom of the node form. If set to TRUE, with this change you'll get duplicative action buttons -- at the top of the form, and in the "gin_sticky" area.

✨ Feature request
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States beunerd Providence, Rhode Island

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024