Action "List: remove item (drop by specified value)" fails when value is a token

Created on 21 May 2025, 13 days ago

Problem/Motivation

If the value to remove in the action List: remove item comes from a token, the value is not removed because the strict comparison of the properties with the value in \Drupal\eca\Plugin\DataType\DataTransferObject::remove() always returns false.

Steps to reproduce

See attached ECA BPMN model:

  • Without the fix, the list contains both items and the removed item is empty when viewing a content entity
  • With the fix, the list contains 1 item and the removed item is displayed when viewing a content entity

Proposed resolution

\Drupal\eca\Plugin\Action\ListRemoveBase::removeItem() already gets the value in the second condition if ($value instanceof TypedDataInterface). Move that code up to cover both cases.

Remaining tasks

Write tests.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇨🇭Switzerland boromino

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