The hook_form_workflow_transition_form_alter is no longer available

Created on 9 September 2025, 23 days ago

Problem/Motivation

The hook_form_workflow_transition_form_alter documented in workflow.api.php is no longer available.

It seems like this is a regression caused by this commit:
https://git.drupalcode.org/project/workflow/-/commit/69e651a039b9cb406e8...

The WorkflowTransitionForm::createInstance method usage was replaced by WorkflowTransitionForm::retrieveFormElement, which does not call the form builder anymore (which was responsible for calling alter hooks).

Steps to reproduce

Implement a hook_form_workflow_transition_form_alter, observe it's not being called.

Proposed resolution

Mimic the \Drupal\Core\Form\FormBuilder::prepareForm(), call the alter hooks the same way it does.

Remaining tasks

Review & testing.

User interface changes

None.

API changes

Fix of the API regression.

Data model changes

None.

πŸ› Bug report
Status

Active

Version

2.1

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine abramm Lutsk

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