Buttons in certain conditions not clickable

Created on 23 May 2025, about 1 month ago

Problem/Motivation

When using gin everywhere in bpmn_io the buttons provided by bpmn_io (like Save, Layout model, Close, etc.) are not clickable.

Steps to reproduce

- Setup fresh Drupal 10.4.6
- Install https://www.drupal.org/project/ECA and https://www.drupal.org/project/bpmn_io
- Create new ECA model under /admin/config/workflow/eca/add/bpmn-io
- Try to use the buttons

Proposed resolution

- Overwriting CSS button property and add a higher z-index

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇩🇪Germany Istari

Live updates comments and jobs are added and updated live.
  • Novice

    It would make a good project for someone who is new to the Drupal contribution process. It's preferred over Newbie.

  • CSS

    It involves the content or handling of Cascading Style Sheets.

Sign in to follow issues

Merge Requests

Comments & Activities

  • Issue created by @Istari
  • 🇧🇷Brazil julio_retkwa Balneário Camboriú

    Does this happens in any other module/theme or just on gin?

  • 🇩🇪Germany sunlix Wesel

    hey together,

    gin_everywhere breaks the intended sidebar on the bpmn_io UI.

    Without gin_everywhere the original UI looks like:

    I think the proposed solution does not lead to a proper solution here. Anythink breaks the intended sidebar building by gin I think.

  • 🇩🇪Germany Istari

    @julio_retkwa: as far as I could see it only breaks bpmn_io

    @sunlix: I'm not quite sure what you mean by your answer. In my case (see steps to reproduce) the sidebar was not broken and fully usable. There had been a problem with the buttons, as you can see in my screenshot. Maybe if you could post a screenshot with activated gin_everywhere module, so we can see the difference (or correct my assumption. :) )

  • 🇩🇪Germany Hydra

    For me it looks like Jürgen already integrated ECA perfectly with gin, so gin_everywhere maybe should just ignore the ECA Entity Type forms?

  • 🇩🇪Germany Istari

    I tried to find a solution to exclude eca and the bpmn_io modeller from using gin_everwhyere and as far as I understood shouldn't the bpmn io modeller use gin_everywhere.

    When we take a look into gin_everywhere_gin_content_form_routes_alter

    function gin_everywhere_gin_content_form_routes_alter(array &$routes) {
      $routes = [];
      foreach (\Drupal::entityTypeManager()->getDefinitions() as $entity_type_id => $entity_type) {
        if ($entity_type->getGroup() == 'content') {
          $routes[] = "entity.$entity_type_id.create_form";
          $routes[] = "entity.$entity_type_id.edit_form";
          $routes[] = "entity.$entity_type_id.override_form";
          $routes[] = "$entity_type_id.add";
          $routes[] = "entity.$entity_type_id.add_form";
          $routes[] = "entity.$entity_type_id.revision";
          $routes[] = "entity.$entity_type_id.content_translation_add";
        }
      }
    
      // Extra routes that does not fit the pattern.
      $routes[] = 'block_content.add_page';
      $routes[] = 'block_content.add_form';
      $routes[] = 'entity.block_content.canonical';
      $routes[] = 'entity.media.canonical';
      $routes[] = 'entity.menu.add_link_form';
      $routes[] = 'entity.menu_link_content.canonical';
    }

    When iterating through the entity type definitions we can see that the entity type eca as well as eca_model are both of type of a configuration entity, so they don't appear in the $routes[] array.
    So far so good.

    Why does gin_everywhere appear on bpmn_io modeller?

    Lets take a look at the paths and routes:

    When using admin/config/workflow/eca/add (eca.add) we get redirected to /admin/config/workflow/eca/add/bpmn-io (bpmn_io.add) which is no entity, so therefore this route will not be included into the $route array.

    But when checking for those two routes in gin_everywhere_form_alter with

      if (\Drupal::routeMatch()->getRouteName() == 'entity.eca.edit_form' || \Drupal::routeMatch()->getRouteName() == 'bpmn_io.add') {
        return;
      }
    

    the function return happens and the gets stopped at this point.
    But even if the check for the routes would pass, the hook is stopped by

      // Make sure we are on a gin form.
      if (!\Drupal::classResolver(GinContentFormHelper::class)->isContentForm($form, $form_state, $form_id)) {
        return;
      }

    but gin_everywhere is still shown in the bpmn_io modeller and I'm not sure in which direction to take further investigation.

    If you could give me some advise, it would be highly appreciated :)

Production build 0.71.5 2024