ECA Form: form events use reserved config key "form_id"

Created on 2 July 2025, about 1 month ago

Problem/Motivation

The form events (and their tests) use the key form_id for their configuration. Now that modelers may use Drupal's form API to render their forms, this will create a conflict with the form_id of the API.

Proposed resolution

We need to use another name for this configuration key and also provide a mechanism to update existing models.

🐛 Bug report
Status

Active

Version

3.0

Component

Code

Created by

🇩🇪Germany jurgenhaas Gottmadingen

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

Comments & Activities

  • Issue created by @jurgenhaas
  • @jurgenhaas opened merge request.
  • 🇩🇪Germany jurgenhaas Gottmadingen

    This is changing the config items form_id into form_ids since most of them allow a list of IDs anyway.

    The MR also adds the change to the migrate script for older models that come into ECA 3.

  • 🇩🇪Germany jurgenhaas Gottmadingen
  • 🇩🇪Germany jurgenhaas Gottmadingen

    I've had to fix the search and replace for the raw data as we search for <camunda:field name="form_id"> before. That misses cases where the raw data contains <camunda:field name="form_id"/>. So, we're now searching for camunda:field name="form_id" and replace that with camunda:field name="form_ids", i.e. without the brackets. It's still specific enough to not find other cases.

  • 🇨🇭Switzerland boromino

    The code looks good and works, including the migration of models from version 2: form_id is replaced by form_ids in the new modeler_api config files.

    The name could have been e.g. restrict_by_form_id (with would match its label) instead of form_ids, but as the other similar config form fields don't use such prefix either, the change is pragmatic and fixes the issue of the hidden form id field.

    • jurgenhaas committed 79c436c8 on 3.0.x
      Issue #3533707 by jurgenhaas: ECA Form: form events use reserved config...
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Thank you @boromino for testing and reviewing the code, this is very helpful.

  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.71.5 2024