Support

Home Forums Event Espresso Premium Newsletter Database Error

Newsletter Database Error

Posted: January 11, 2016 at 10:09 am


Erica Vandiver

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?


Josh

  • Support Staff

January 12, 2016 at 11:12 am

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/


Erica Vandiver

January 12, 2016 at 11:44 am

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.


Josh

  • Support Staff

January 12, 2016 at 12:23 pm

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?


Erica Vandiver

January 12, 2016 at 12:45 pm

Screenshot


Erica Vandiver

January 12, 2016 at 12:46 pm

https://drive.google.com/file/d/0B8BotcN1Yw-sZjRFSXhXNGYybzg/view?usp=sharing


Josh

  • Support Staff

January 12, 2016 at 1:21 pm

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.


Erica Vandiver

January 12, 2016 at 1:32 pm

Oh sorry – I thought you wanted to see settings.

https://gist.github.com/dysert/7f79fedcc027d18ef300

https://gist.github.com/dysert/c1ab3b84866f2ba295d6


Josh

  • Support Staff

January 12, 2016 at 2:48 pm

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:

define( 'WP_DEBUG', true ); 
if ( WP_DEBUG ) {
    define( 'WP_DEBUG_LOG', true );
    define( 'WP_DEBUG_DISPLAY', 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.


Erica Vandiver

January 12, 2016 at 3:14 pm

<script src=”https://gist.github.com/dysert/ebde4f224b1f9255cf8b.js”></script>


Erica Vandiver

January 12, 2016 at 3:15 pm

Oops, thought I could embed that 😉


Josh

  • Support Staff

January 12, 2016 at 4:16 pm

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:

Hello [RECIPIENT_FNAME]:


Erica Vandiver

January 13, 2016 at 6:40 am

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?


Josh

  • Support Staff

January 13, 2016 at 8:56 am

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.

Event Espresso