StateTransitionForm breaks for fields with digits in their name

Created on 24 June 2023, over 1 year ago
Updated 24 November 2023, 12 months ago

Problem/Motivation

An entity leveraging the state transition form link template
- has a route added by state_machine ordinarily
- unless the field has a digit in it.

Debugging this shows this reason:

class RouteSubscriber extends RouteSubscriberBase {
  protected function alterRoutes(RouteCollection $collection) {
      $route
        ->setRequirement('transition_id', '[a-z_]+')
        ->setRequirement('field_name', '[a-z_]+')

Proposed resolution

Fix the transition and route patterns.

🐛 Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

🇩🇪Germany geek-merlin Freiburg, Germany

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024