TypeError when reverting a state

Created on 24 February 2025, about 2 months ago

Problem/Motivation

The following error occurs when trying to revert a state in the Workflow History tab:

TypeError: Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in \drupal\core\lib\Drupal\Component\Render\FormattableMarkup.php on line 238 in Drupal\Component\Utility\Html::escape() (line 432 of \drupal\core\lib\Drupal\Component\Utility\Html.php).

This happens because a pop-up is displayed with the question :

    $question = $this->t(
      'Are you sure you want to revert %title to the "@state" state?',
      [
        '@state' => $state->label(),
        '%title' => $transition->label(),
      ]
    );

For some reason, $transition->label() returns NULL.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

1.0

Component

Workflow Revert

Created by

🇳🇱Netherlands johnv

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

Comments & Activities

Production build 0.71.5 2024