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)

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

chucksimply created an issue. See original summary.

chucksimply’s picture

The attached patch fixes this on my end. Please review. Curious if these lines needs to be applied to other files as well?

chucksimply’s picture

Status: Active » Needs review
boby_ui’s picture

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

mxh’s picture

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'));
  }
?>

but the plugin currently does not implement the according interface, which prevents other components from properly recognizing the instantiation method, leading to the problem reported here.

jurgenhaas’s picture

Status: Needs review » Reviewed & tested by the community

Confirmed, and setting to RTBC.