Posted: January 11, 2016 at 10:09 am
|
I tried sending a newsletter to a batch of registrants, and got a “An error has occurred: A database error has occurred. Turn on WP_DEBUG for more information.” error. The emails were sent, however. When I do the same using the Global template instead of either of my custom emails, I don’t have the issue. The email is not ‘assigned’ to the event because I can’t figure out how to do that. By the way, is there documentation for newsletters yet? |
Hi Toni, Before you go to send the newsletter, are you making any edits to the selected template? You can find the Newsletter documentation in the wiki: https://eventespresso.com/wiki/how-to-create-and-send-a-newsletter/ |
|
|
Thanks for that! I didn’t make any changes to the default message template, but did create 2 custom templates. Both are creating the error. Specifically, I choose a user from Registraions, click Send Batch Message, choose the message and click send. I get a processing gear icon spinning, and the email shows in my inbox. The gear is still spinning. After a few more seconds, I get the error. |
It may help to know the contents of the newsletter message. Is that something you can copy into a gist or a pastebin and link to here? |
|
|
|
|
https://drive.google.com/file/d/0B8BotcN1Yw-sZjRFSXhXNGYybzg/view?usp=sharing |
The screenshot kind of helps, but it’s best to copy the actual text from the text view of the editors. There could be something in the bottom editor, but I can’t tell from the screenshot since it’s in visual mode. |
|
|
Oh sorry – I thought you wanted to see settings. |
Hi Toni, The contents of those emails look fine. What you can next is enable WP_DEBUG logging so it can capture the actual database error. You can actually set it to log only so the warnings and notices do not display all over the site if there are deprecated notices being thrown by your WordPress theme or something. You add the following to your wp-config.php file and replace where it normally sets WP_DEBUG to false:
Then it will log files to the wp-content/debug.log file, and when you send out a custom newsletter it should capture that error. |
|
|
<script src=”https://gist.github.com/dysert/ebde4f224b1f9255cf8b.js”></script> |
|
Oops, thought I could embed that 😉 |
The  that’s appended to the end of Hello looks like a character encoding issue. Can you try editing that line of the message template, just remove the whole thing and replace it with this:
|
|
|
If I strip out ALL HTML it works. I did that before, because it was sending garbled messages. I made a support post (https://eventespresso.com/topic/ee4-4-8-13-emails-wonky/) and was told to use Mandrill, etc. Something is adding HTML in after I save, I guess? |
That’s a good clue and you can rule out whether that something is another plugin or a theme function by temporarily deactivating all other WordPress plugins and switching to the default theme. |
|
The support post ‘Newsletter Database Error’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.