TypeError: Drupal\eca_modeller_bpmn\ModellerBpmnBase::buildConfigurationForm()

Created on 1 August 2024, 4 months ago
Updated 30 August 2024, 3 months ago

Problem/Motivation

After Upgrading from Drupal 10.2.5 to 10.3.1 and ECA 1.x to 2.x i get the following error when creating or editing an existing BPMN ECA flow. Other modellers work.

Modules used

  • Machine name: bpmn_io - Version: 2.0.0
  • Machine name: eca -Version: 2.0.1
TypeError: Drupal\eca_modeller_bpmn\ModellerBpmnBase::buildConfigurationForm(): Return value must be of type array, null returned in Drupal\eca_modeller_bpmn\ModellerBpmnBase->buildConfigurationForm() (line 584 of modules/contrib/eca/modules/modeller_bpmn/src/ModellerBpmnBase.php).
Drupal\eca_modeller_bpmn\ModellerBpmnBase->getTemplates() (Line: 85)
Drupal\bpmn_io\Plugin\ECA\Modeller\BpmnIo->edit() (Line: 208)
Drupal\eca_ui\Controller\EcaController->edit('process_xon9our')
call_user_func_array(Array, Array) (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 638)
Drupal\Core\Render\Renderer->executeInRenderContext(Object, Object) (Line: 121)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext(Array, Array) (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 181)
Symfony\Component\HttpKernel\HttpKernel->handleRaw(Object, 1) (Line: 76)
Symfony\Component\HttpKernel\HttpKernel->handle(Object, 1, 1) (Line: 53)
Drupal\Core\StackMiddleware\Session->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle(Object, 1, 1) (Line: 28)
Drupal\Core\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 32)
Drupal\big_pipe\StackMiddleware\ContentLength->handle(Object, 1, 1) (Line: 57)
Drupal\advban\AdvbanMiddleware->handle(Object, 1, 1) (Line: 50)
Drupal\ban\BanMiddleware->handle(Object, 1, 1) (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle(Object, 1, 1) (Line: 36)
Drupal\Core\StackMiddleware\AjaxPageState->handle(Object, 1, 1) (Line: 49)
Drupal\remove_http_headers\StackMiddleware\RemoveHttpHeadersMiddleware->handle(Object, 1, 1) (Line: 51)
Drupal\Core\StackMiddleware\StackedHttpKernel->handle(Object, 1, 1) (Line: 741)
Drupal\Core\DrupalKernel->handle(Object) (Line: 19)

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.1

Component

Code

Created by

🇩🇪Germany fox_01

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

Merge Requests

Comments & Activities

  • Issue created by @fox_01
  • 🇩🇪Germany jurgenhaas Gottmadingen

    There must be an action plugin for which the configuration form can not be built. In such a scenario there is an error written to the Drupal logs, something like this: The configuration form of %label action plugin can not be loaded. Plugin ignored.

    Can you please have a look in the logs and see, which plugin is mentioned there?

  • 🇩🇪Germany fox_01

    It says

    The configuration form of workflow_node_given_state_action action plugin can not be loaded. Plugin ignored.

    It is also happening with the latest dev of BPMN.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Oh, the workflow module. That's causing headaches a lot. This error is caused by the workflow module and should be reported there. Somewhere in \Drupal\workflow\Plugin\Action\WorkflowNodeGivenStateAction::buildConfigurationForm it throws an exception and ECA is trying to capture that, but then has a follow-up issue since it has no form available.

    I'm moving this issue to ECA to improve the catch process there. But the workflow issue still needs to be reported there.

  • Status changed to Needs review 4 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    The MR improves the error message in the logs to also tell us about the exception that caused the issue in the other module. It then also falls back to a configuration form that tells the user, that there is an issue, instead of causing an issue.

    @fox_01 please review and test the MR, but don't forget to let the workflow maintainers know as well.

  • Pipeline finished with Success
    4 months ago
    Total: 461s
    #240724
  • Pipeline finished with Skipped
    3 months ago
    #255923
  • Pipeline finished with Skipped
    3 months ago
    #255924
  • Status changed to Fixed 3 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    It's really disappointing when, as a maintainer, you fix bugs and then don't get feedback from the reported. I've now tested again myself and believe this is working.

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

Production build 0.71.5 2024