ArgumentCountError appears when using ECA

Created on 29 December 2022, almost 2 years ago
Updated 3 April 2024, 8 months ago

Problem/Motivation

Not sure if this is a one off problem to my setup, or if this is a fix needed globally. I have the payment module installed and working fine... but after installing the ECA module and the ECA model interface BPMN.IO , I received the below error when trying adding a new ECA model.

ArgumentCountError: Too few arguments to function Drupal\payment\Plugin\Action\UnsetLineItem::__construct(), 3 passed in /web/core/lib/Drupal/Core/Plugin/Factory/ContainerFactory.php on line 25 and exactly 4 expected in Drupal\payment\Plugin\Action\UnsetLineItem->__construct() (line 37 of /web/modules/contrib/payment/src/Plugin/Action/UnsetLineItem.php)

🐛 Bug report
Status

RTBC

Version

2.0

Component

Code

Created by

🇺🇸United States chucksimply

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇩Indonesia boby_ui

    +1 confirmed that it fixed the ECA with payment issues!!

  • 🇩🇪Germany mxh Offenburg

    Patch of #2 makes sense. Currently there is an implementation as follows within Drupal\payment\Plugin\Action\UnsetLineItem:

    <?php
    /**
       * {@inheritdoc}
       */
      public static function create(ContainerInterface $container, array $configuration, $plugin_id, $plugin_definition) {
        return new static($configuration, $plugin_id, $plugin_definition, $container->get('string_translation'));
      }
    ?>

    hovever the plugin currently does not implement the according interface, which prevents third party modules like ECA to recognize the instantiation method, leading to the problem reported here.

  • Status changed to RTBC 8 months ago
  • 🇩🇪Germany jurgenhaas Gottmadingen

    Confirmed, and setting to RTBC.

Production build 0.71.5 2024