eca_diff_entity: Error building form

Created on 8 September 2025, 8 days ago

Problem/Motivation

The config form for the plugin eca_diff_entity can't be built because of the following error message.

The configuration form of eca_diff_entity action plugin can not be loaded. Plugin ignored. implode(): If argument #1 ($separator) is of type string, argument #2 ($array) must be of type array, null given

Steps to reproduce

Create an ECA model with the entity: compare action after an entity: update event.
Check, that the action form can not be built.

Proposed resolution

I think there is something in initializing the defaultConfiguration.
The EntityDiffTrait has all thinks set up right I think.

public function commonDefaultConfiguration(): array {
return [
'token_name' => '',
'compare_token_name' => '',
'exclude_fields' => [],
'include_fields' => [],
] + parent::defaultConfiguration();
}

Remaining tasks

User interface changes

API changes

Data model changes

πŸ› Bug report
Status

Active

Version

3.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany sunlix Wesel

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

Merge Requests

Comments & Activities

  • Issue created by @sunlix
  • πŸ‡©πŸ‡ͺGermany sunlix Wesel
  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Moving this to the bpmn_io project as this is an issue with upcasting config values that we receive from the canvas, which only always provides strings, but config values may be declared as arrays. So far, the upcasting in this scenario tries a JSON decode, but if that fails it needs to try exploding lines into an array.

  • πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

    Please test and review the MR.

  • πŸ‡©πŸ‡ͺGermany sunlix Wesel

    Hey JΓΌrgen,

    thank you very much for investigating.
    I applied the patch and now, the config form of the action is rendered correctly.

    After setting up the action and hit save, another issue raised. Maybe it is a follow up?

    TypeError: Drupal\eca_ui\Plugin\ModelerApiModelOwner\Eca::prepareFormFieldForValidation(): Argument #1 ($value) must be of type ?string, array given, called in /var/www/html/web/modules/contrib/modeler_api/src/Component.php on line 273 in Drupal\eca_ui\Plugin\ModelerApiModelOwner\Eca->prepareFormFieldForValidation() (line 323 of /var/www/html/web/modules/contrib/eca/modules/ui/src/Plugin/ModelerApiModelOwner/Eca.php).
    
  • Pipeline finished with Skipped
    about 14 hours ago
    #599052
Production build 0.71.5 2024