Hi, folks. I was tracking down an issue with Simplenews, and I believe Mail Logger was actually at fault. Please see #1951222: PDOException related to language and continue the conversation here.
| Comment | File | Size | Author |
|---|---|---|---|
| #11 | mail_logger-language_null-1952880-9.patch | 1.1 KB | svarc |
Comments
Comment #1
areynolds commentedAny mail that does not specify a language will cause this error; patch attached uses LANGUAGE_NONE when no language is specified to fix the issue.
Note that Mail Log presents an alternative to this module if you're having issues.
Comment #2
stephen verdant commentedThe first patch included git's color codes. Same patch without them...
Comment #3
fizk commentedFixed, thanks!
Comment #6
Talkless commentedFixed? I still got error (in Drupal 7.31 using PHP 5.5.9-1ubuntu4.3):
I've just wrote watchdog() to check if emaillog will actually send email about new WATCHDOG_ERROR entry.
Comment #7
lachezar.valchev commentedHi,
I can confirm that I still reproduce the error with Drupal 7.21 and the latest Mail Logger 7.x-dev from 2014-May-21.
Regards,
Lachezar
Comment #8
lachezar.valchev commentedHi,
Here is a patch to fix the issue.
From what I saw dumping the logger array it is probably changed now and it is the language is no longer at $logger['language']->language, but at $logger['language']
I suppose the $logger['language'] will always have the language, but just in case I left the IF check from the previous patch.
Regards,
Lachezar
Comment #9
Talkless commentedHm, funny thing is, I do no know how to reproduce it. I cannot get error on clean Drupal installation, and I didn't applied any patch.
Comment #10
PascalAnimateur commentedI had the exact same problem when sending mail from the simplenews module and the patch from #8 fixed the issue. Thanks @graphityx
Comment #11
svarc commentedIts true what @graphityx is saying but there are still some cases where the $logger['language']->language is used instead of $logger['language'], this is the case for example with the webform module.
So here is an updated patch that will handle both situations.
Comment #13
fizk commentedCommitted, thanks!
Comment #14
fizk commented