Steps to reproduce:
Create a rule that reacts on content being viewed. Create an action that sends a mail.
When hitting the "Save" button, I get "The website encountered an unexpected error. Please try again later.".
In the error.log, I can find:
[Sun Apr 17 21:18:45 2016] [error] [client 188.193.196.26] Uncaught PHP Exception InvalidArgumentException: "The configuration property expression.actions.actions.0.context_values.to.0 doesn't exist." at /home/turion/manuel/core/lib/Drupal/Core/Config/Schema/ArrayElement.php line 79, referer: https://www.manuelbaerenz.de/admin/config/workflow/rules/reactions/edit/...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

turion created an issue. See original summary.

ToxaViking’s picture

Have the same issue during save rule with Send email Action

giuliovale’s picture

@ToxaViking same error in my case with Send email Action

oushen’s picture

giuliovale’s picture

#4 fix this error

hauruck’s picture

Yes, #4 solves the problem here too, thank you!

ToxaViking’s picture

#4 works for me

FiNeX’s picture

Thanks for the patch, it works as expected.

rick_p’s picture

Thank you Oushen!! It fixed my Exception error as well. For those new to patching, this will help...

Place the patch in the Rules module schema folder (/modules/rules/config/schema)

Then run this command from the command line, be sure to navigate into the schema folder first or adjust the command to include the full path: patch < rules-InvalidArgumentExceptionOnSendMailActionSave-2708021-4-d8.patch

btafoya’s picture

N/A, no longer an issue.

klausi’s picture

Status: Needs review » Needs work
Issue tags: +Contributor, +Needs tests

Looks like this is missing tests? Can you also file a pull request at https://github.com/fago/rules/pulls

alessio_buscemi’s picture

Assigned: Unassigned » alessio_buscemi
alessio_buscemi’s picture

Assigned: alessio_buscemi » Unassigned

In the branch 8.x-3.x the issue is already resolved and the tests (testSendMailToTwoRecipients and testSendMailToOneRecipientcorrectly) work correctly.
the patch is no longer required.

acrollet’s picture

Status: Needs work » Fixed

Marking as fixed based on #13

Status: Fixed » Closed (fixed)

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