TypeError in workflow_node_current_state() for missing entity

Created on 25 April 2025, 8 days ago

Problem/Motivation

When adding an extra field to a workflow type, the following error appears:

TypeError: workflow_node_current_state(): Argument #1 ($entity) must be of type Drupal\Core\Entity\EntityInterface, null given, called in \workflow\src\Entity\WorkflowTransition.php on line 869 in workflow_node_current_state() (line 431 of \workflow\workflow.module).

Steps to reproduce

- enter workflow settings
- go to 'Manage fields' tab
- add a field
- error occurs

Proposed resolution

Add extra conditions.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

2.0

Component

Code

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