Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.I'm looking to create what should be some relatively basic rules, but am going around in ever decreasing circles attempting to find a combination of stable patches to get things working.
The only action required is to send an email )upon creation of a new account, a new node, a new comment, or an updated comment).
My problem here is that the current stable release does not provide a text field for the email body.
This issue is discussed here: https://www.drupal.org/project/rules/issues/2724129
In that thread the most recent discussion says that the fix requires work on the following: https://www.drupal.org/project/rules/issues/2471481
The most recent patch in that issue fails with the current stable release.
So, as far as I can determine, there is currently no working solution to the email body field issue.
The second issue I'm facing is that in some of my rules I need to use the condition that the user has a specific role.
This one gets me even more dizzy trying to figure out the current state of this condition, as there are a number of threads discussing the errors that this condition can throw.
For example: https://www.drupal.org/project/rules/issues/2725525#comment-11438731
Which most recently suggest to look at the ‘bigger’ issue discussed here: https://www.drupal.org/project/rules/issues/2800749#comment-13698072
The most recent comments in that thread suggest that the newest patch has errors and validation issues.
All of the above has me completely confused and unsure if it is currently possible to get my desired rules working.
So, I was hoping that there is somebody who has been able to get this or similar functionality working, and who can give me some pointers. Thanks!
Comments
Comment #1
Anonymous (not verified) commentedJanner created an issue. See original summary.
Comment #2
tree2009 commentedBefore they are available, alternatively, you can write a custom module with custom rule action to sent the email. In the custom action, you can hardcode the email body for quick turnaround, or create separate normal configure page to configure it. Also, you can write a custom rule condition to evaluate has role flexible.
Comment #3
tr commented"The most recent patch in that issue fails with the current stable release"
Patches in Drupal are meant to be applied to the current -dev, not to -alpha6 or any other version. If a patch doesn't apply to the current -dev anymore, then you can help out in the issue by re-rolling the patch so that it does apply.
All of those issues have quick and dirty hacks to let you do what you need, if you really need it now and can't wait for a proper fix. That's why several of those issues were left open instead of being marked as duplicates - so people can find and use those hacks if they want. There's a small hack that changes the email body to a textarea for the "Send email" action, but it doesn't fix any other field that should be a textarea and it doesn't fix any other action. But that might be enough for you right now. Likewise, there is a small hack that changes a role ID to a Role object in the "User has role" condition, but doesn't fix the issue with Role objects everywhere. Again, that might be all you need for now.
In the long run, it will benefit everyone if you try to contribute to the bigger issues.