Error after enabling BPMN.iO and adding New model

Created on 8 March 2023, about 2 years ago
Updated 13 July 2023, almost 2 years ago

Using Open Social distribution (although the stack trace does not indiate that)

Problem/Motivation

After installing After installing BPMN.iO for ECA
And trying to clicking 'Add new model',
The error appears:

The website encountered an unexpected error. Please try again later.
Error: Cannot use object of type Drupal\Core\StringTranslation\PluralTranslatableMarkup as array in Drupal\eca_modeller_bpmn\ModellerBpmnBase->prepareConfigFields() (line 740 of modules/contrib/eca/modules/modeller_bpmn/src/ModellerBpmnBase.php).
Drupal\eca_modeller_bpmn\ModellerBpmnBase->prepareConfigFields() (Line: 591)
Drupal\eca_modeller_bpmn\ModellerBpmnBase->properties() (Line: 547)
Drupal\eca_modeller_bpmn\ModellerBpmnBase->getTemplates() (Line: 76)
Drupal\bpmn_io\Plugin\ECA\Modeller\BpmnIo->edit() (Line: 61)
Drupal\bpmn_io\Controller\BpmnIo->add()
call_user_func_array() (Line: 123)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 564)
Drupal\Core\Render\Renderer->executeInRenderContext() (Line: 124)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (Line: 97)
Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}() (Line: 169)
Symfony\Component\HttpKernel\HttpKernel->handleRaw() (Line: 81)
Symfony\Component\HttpKernel\HttpKernel->handle() (Line: 58)
Drupal\Core\StackMiddleware\Session->handle() (Line: 48)
Drupal\Core\StackMiddleware\KernelPreHandle->handle() (Line: 48)
Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle() (Line: 51)
Drupal\Core\StackMiddleware\NegotiationMiddleware->handle() (Line: 23)
Stack\StackedHttpKernel->handle() (Line: 709)
Drupal\Core\DrupalKernel->handle() (Line: 19)
💬 Support request
Status

Fixed

Version

1.1

Component

Code

Created by

🇳🇱Netherlands Yuri

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

Comments & Activities

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

    Hi @Yuri this sounds like a duplicate of 🐛 Cannot use object of type PluralTranslatableMarkup as array Fixed where we thought we got this fixed. Looks like we didn't get it all. Could you please let us know what other modules you have installed? Maybe one of them provides an action plugin which does things that we haven't captured yet.

  • 🇩🇪Germany jurgenhaas Gottmadingen

    I just reviewed the original post which states that Open Social is being used, I missed that before I wrote my comment. Then it is the same issue as the linked one.

    And I just reviewed the code. In version 1.1.2 of ECA this is certainly fixed. The stack trace looks like it is from version 1.1.1 when I compare the line number. @Yuri could you please verify that you've installed 1.1.2?

  • 🇳🇱Netherlands Yuri

    Hi Jurgen, the modules page says ECA core is indeed version 1.1.1.
    Which is a bit strange because I installed it using the composer link on the project page, which says:
    1.1.2 Stable release covered by the Drupal Security Team released 1 March 2023. composer require 'drupal/eca:^1.1'

    I'll install the dev version now, thanks

  • 🇳🇱Netherlands Yuri

    Using the current ECA dev version:
    The BPMN.iO display now appears, but on top of that a bunch of error messages:

    Warning: Trying to access array offset on value of type null in Drupal\social_group\Plugin\Action\AddMembersToGroup->buildConfigurationForm() (line 117 of profiles/contrib/social/modules/social_features/social_group/src/Plugin/Action/AddMembersToGroup.php).
    
    Warning: Trying to access array offset on value of type null in Drupal\social_group\Plugin\Action\AddMembersToGroup->buildConfigurationForm() (line 129 of profiles/contrib/social/modules/social_features/social_group/src/Plugin/Action/AddMembersToGroup.php).
    
    Warning: Array to string conversion in Drupal\eca_modeller_bpmn\ModellerBpmnBase->optionsField() (line 838 of modules/contrib/eca/modules/modeller_bpmn/src/ModellerBpmnBase.php).
    
    Warning: Array to string conversion in Drupal\eca_modeller_bpmn\ModellerBpmnBase->optionsField() (line 838 of modules/contrib/eca/modules/modeller_bpmn/src/ModellerBpmnBase.php)
    
    Warning: Array to string conversion in Drupal\eca_modeller_bpmn\ModellerBpmnBase->optionsField() (line 838 of modules/contrib/eca/modules/modeller_bpmn/src/ModellerBpmnBase.php).
    
    Warning: Trying to access array offset on value of type null in Drupal\social_group\Plugin\Action\ChangeGroupMembershipRole->buildConfigurationForm() (line 138 of profiles/contrib/social/modules/social_features/social_group/src/Plugin/Action/ChangeGroupMembershipRole.php).
    
    Warning: array_flip(): Can only flip string and integer values, entry skipped in Drupal\Core\Entity\EntityStorageBase->loadMultiple() (line 312 of core/lib/Drupal/Core/Entity/EntityStorageBase.php).

    The full stack traces are here: https://gist.github.com/Corvalan/bb55278ac50e387ba8f95268a334f3b7

  • 🇩🇪Germany jurgenhaas Gottmadingen

    Well, I would really try to get 1.1.2 properly installed. With composer require drupal/eca you should by default always get the latest stable version. And afterwards you can execute composer show drupal/eca which shows you the installed version with a lot of more detail.

    Regardless, the warnings are all coming from the open social plugins. What ECA does, is to ignore such plugins that behave strangely. To find out it instantiates all plugins and then ignores those that throw exceptions, errors or warnings like those above. But the warnings you've show are not displayed on screen, are they? When you configure Drupal to not show warnings, they should only got into the log, but not onto screen.

  • Status changed to Postponed: needs info about 2 years ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    What's the current status on this issue?

  • Status changed to Fixed almost 2 years ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Closing due to missing feedback.

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

Production build 0.71.5 2024