Problem/Motivation

After upgraded from version alpha5 to alpha 6 I get the following error:

The website encountered an unexpected error. Please try again later.
TypeError: Argument 2 passed to Drupal\rules\Engine\RulesComponent::addContextDefinition() must implement interface Drupal\rules\Context\ContextDefinitionInterface, array given, called in /var/www/web/modules/contrib/rules/src/Engine/RulesComponent.php on line 176 in Drupal\rules\Engine\RulesComponent->addContextDefinition() (line 146 of modules/contrib/rules/src/Engine/RulesComponent.php).

Steps to reproduce

installed modules:

  • Drupal 8.9.3
  • Rules 8.x-3.0-alpha6 (upgraded from rules 8.x-3.0-alpha5)
  • Typed Data API enhancements 8.x-1.0-alpha5 (upgraded 8.x-1.0-alpha4)
  • Rules Webform 8.x-1.4
  • Rules User Fields 8.x-1.1

- React on event Select "webform submit"
Doesn't appear the webforms list, when I look at the page source I see that the
html tag has a style attribute "display:none". I disable this attribute and I can select my form.

After I save the page, I get the error diplayed above.

Until Rules 8.x-3.0-alpha5 it was working fine
I also tried to install typed_data 8.x-1.x-dev but the same error occur

Comments

toci created an issue. See original summary.

daniele belitrandi’s picture

Issue summary: View changes
tr’s picture

Assigned: daniele belitrandi » Unassigned
Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)
Issue tags: -rules, -Webform submission, -event

Probably Rules Webform and Rules User Fields haven't been updated to the current Rules API. You haven't really given enough information to reproduce this - I don't understand from your description when and where the error appears.

tr’s picture

Project: Rules » RULES WEBFORM
Version: 8.x-3.0-alpha6 » 8.x-2.x-dev
Component: Rules Core » Code

I think it's likely that the problem is in Rules Webform. A look at that module shows me it has not been updated for the core Drupal change of https://www.drupal.org/node/3016699. That tells me there may be other problems too, since Rules has made a lot of changes in the past year.

wombatbuddy’s picture

Status: Postponed (maintainer needs more info) » Fixed
wombatbuddy’s picture

Status: Fixed » Closed (fixed)