- Issue created by @pasqualle
- ๐ญ๐บHungary pasqualle ๐ญ๐บ Budapest
It seems implementing hook_gin_content_form_routes() solves the problem.
Please register all the new routes with this hook.
As a quick workaround, the hook can be used in a custom module as:
function mymodule_gin_content_form_routes() { return [ 'entity.node.edit_form.myformmode', ]; }
- First commit to issue fork.
- Open on Drupal.org โCore: 9.5.x + Environment: PHP 7.4 & MySQL 5.7last update
almost 2 years ago Not currently mergeable. - @chester_ opened merge request.
- Status changed to Needs review
about 1 year ago 9:15pm 12 April 2024 - ๐ฎ๐นItaly kopeboy Milan
Thank you, this works while editing entities, but there is still a problem when using /node/add-list/[CUSTOM_FORM_MODE] (which is problematic on its own and I'm trying to get rid of anyway, at least of the button links at /admin/content ๐
- Status changed to Active
12 months ago 10:30am 16 April 2024 - ๐ฉ๐ชGermany luenemann Sรผdbaden, Germany
I came up with this:
$route_match = Drupal::routeMatch(); if ($route_match->getRouteObject()->hasOption('_form_mode_manager_entity_type_id') && !str_starts_with($route_match->getRouteName(), 'form_mode_manager.')) { return [$route_match->getRouteName()]; } return []; }
- First commit to issue fork.
- ๐ง๐ชBelgium tim-diels Belgium ๐ง๐ช
tim-diels โ changed the visibility of the branch 3.x to hidden.
- ๐ง๐ชBelgium tim-diels Belgium ๐ง๐ช
Added the code from the latest comment as a MR as this worked for me.