Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I am getting the following errors...
Email is received, but it has the same background color I am using on my site and simply says "Array".
Please help!
-PK-
Comment | File | Size | Author |
---|---|---|---|
#8 | mimemail-1475664-8.patch | 450 bytes | sgabe |
Comments
Comment #1
pixelsticks CreditAttribution: pixelsticks commentedI'm receiving the same error. I'm running PHP 5.2.x. Mine is in response to a rule action "Send HTML email to all users of a role". Another action in the same rule is sending with no trouble. Will be upgrading to PHP 5.3 shortly and will report back whether that helps.
Any thoughts?
Comment #2
pumpkinkid CreditAttribution: pumpkinkid commentedI hope the issue is not with php5.2.x because upgrading to 5.3.x is not an option for me...
What makes you think that's the problem?
Let us know what you find.
Comment #3
pixelsticks CreditAttribution: pixelsticks commentedSame issue with PHP5.3.x, so you're safe there. Nothing made me think it would work, I just needed to upgrade anyway and hoped to kill 2 birds with one stone. I'll keep playing with it and try to isolate the issue. Let me know if you find anything.
Comment #4
pumpkinkid CreditAttribution: pumpkinkid commentedWill do
Comment #5
pixelsticks CreditAttribution: pixelsticks commentedIs your error stemming from a rule? If so, are you sending ton an individual, all users of a role, or another action?
Comment #6
DepricatedZero CreditAttribution: DepricatedZero commentedI'm receiving the same error.
I'm using a Rule to
When new content is saved
-and is of type X
Send email to all users of a role
-administrators
The email I receive just says "Array" - though it does populate the subject appropriately with token replacement. I'm using tokens in the body as well, but just tested and verified that this occurs without tokens too.
Comment #7
skanarakis CreditAttribution: skanarakis commentedI had the same error but I was able to create the rule so that at least the functionality is fine (sending emails with attachements to all users of a role).
Of course, I still get these two warning/notice errors when I am saving a node of a specific content type (the event which triggers the rule). But at least the emails are going out correctly.
What I changed so that I get the desired functionality and not having the Array body in the email was to check the
Send plain text email only
parameter, under the MIME MAIL configuration page. If I leave it unchecked, I too get the Array body in the sent email.
In order to use tokens for my action, I used the Plaintext body section inside the action configuration page.
I hope this helps you.
Comment #8
sgabe CreditAttribution: sgabe commentedWe need to use type text instead of text_formatted for the body field in the Send HTML email to all users of a role action also. The attached patch has been committed.
Note that you will need to clear the cache and update the rule!
Comment #9
skanarakis CreditAttribution: skanarakis commentedWarning about array to string conversion is resolved with application of the patch in #8
Comment #11
SilviuChingaru CreditAttribution: SilviuChingaru commentedWith latest dev and this patch applyed for me is not working. I'm getting the same error:
Comment #12
sgabe CreditAttribution: sgabe commentedComment #13
SilviuChingaru CreditAttribution: SilviuChingaru commentedI did that... But still same error.
Comment #14
sgabe CreditAttribution: sgabe commentedPlease make sure that the change from the patch is really there and you have updated the rule settings. You need to open it for edit, set a new message in the body field and save it.
Comment #15
sgabe CreditAttribution: sgabe commentedClosing due to no activity.
Comment #17
IWasBornToWin CreditAttribution: IWasBornToWin commentedWas this patch committed to dev?
Comment #18
sisayniguasie9@gmail.comWHAT?