Current Gin version does not work with media_library_edit

Created on 26 November 2024, about 1 month ago

Follow-up to πŸ› Current Gin version does not work with media_library_edit Active .

Problem/Motivation

Gin 3.0.0-rc11: The save button is not shown on media modal edit (using media_library_edit).

Steps to reproduce

Try to edit an articles teaser image, there is no Save button.

Proposed resolution

1) Do not enable sticky action buttons in theme settings
2) Implement hook_gin_content_form_routes_alter() to remove all content from routes on Xml Http Requests by:

/**
 * Alter the registered routes to enable or disable Gin’s edit form layout.
 *
 * @param array $routes
 *   The list of routes.
 *
 * @see GinContentFormHelper->isContentForm()
 * @see hook_gin_content_form_routes()
 */
function fle_helper_gin_content_form_routes_alter(array &$routes) {
  // Do not use gin content edit form layout in ajax context (overlays).
  if (\Drupal::request()->isXmlHttpRequest()) {
    $routes = [];
  }
}

πŸ› Bug report
Status

Active

Version

7.3

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany osopolar πŸ‡©πŸ‡ͺ GER 🌐

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

Comments & Activities

Production build 0.71.5 2024