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".
I'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.
I 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.
Same 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.
Is your error stemming from a rule? If so, are you sending ton an individual, all users of a role, or another action?
I'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
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.
I 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.
We 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!
Warning about array to string conversion is resolved with application of the patch in #8
Automatically closed -- issue fixed for 2 weeks with no activity.
With latest dev and this patch applyed for me is not working. I'm getting the same error:
Warning: preg_match_all() expects parameter 2 to be string, array given în token_scan() (line 124 of /drupal/path/includes/token.inc).Notice: Array to string conversion în MimeMailSystem->format() (line 24 of /drupal/path/modules/mimemail/includes/mimemail.mail.inc).Warning: preg_match_all() expects parameter 2 to be string, array given în token_scan() (line 124 of /drupal/path/includes/token.inc).Notice: Array to string conversion în MimeMailSystem->format() (line 24 of /drupal/path/modules/mimemail/includes/mimemail.mail.inc).
I did that... But still same error.
Please 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.
Closing due to no activity.
Was this patch committed to dev?
This issue has no child issues.
Drupal is a registered trademark of Dries Buytaert.