When set rule to save "entity", it throw this error:
The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\rules\Plugin\RulesAction\EntitySave::doExecute() must implement interface Drupal\Core\Entity\EntityInterface, string given in Drupal\rules\Plugin\RulesAction\EntitySave->doExecute() (line 48 of modules/rules/src/Plugin/RulesAction/EntitySave.php).
How to replicate?
- Create a rule
- Add a new action of "Entity Save" type
When rule targeted event happens, it throws the error on frontend.
Also,
When added a condition to find entity field, it throw this error:
The website encountered an unexpected error. Please try again later.
TypeError: Argument 1 passed to Drupal\rules\Plugin\Condition\EntityHasField::doEvaluate() must implement interface Drupal\Core\Entity\FieldableEntityInterface, string given in Drupal\rules\Plugin\Condition\EntityHasField->doEvaluate() (line 42 of modules/rules/src/Plugin/Condition/EntityHasField.php).
Comments
Comment #2
admirernepali CreditAttribution: admirernepali commentedComment #3
shabana.navas CreditAttribution: shabana.navas at Acro Commerce commentedSeems like a duplicate of https://www.drupal.org/node/2776109
Comment #4
TR CreditAttribution: TR commentedWell, you left out all the important steps, like how you configured your Rule. This is why it's important to ALWAYS export your Rule and post it so we can see EXACTLY how you've configured things. And in this case, I'm guessing you configured it wrong, but I can't be sure because you didn't show your work.
Marking as duplicate of #2776109: Recoverable fatal error: Argument 1 passed must implement FieldableEntityInterface. If it's not, then feel free to reopen this issue ALONG WITH AN EXPORT OF YOUR RULE.