Home Forums Event Espresso Premium Events Issues

Events Issues

Posted: March 8, 2023 at 10:11 am

Julie Faver Dylla

March 8, 2023 at 10:11 am

We have been having a lot of issues with attendees trying to register for events but they receive a security error and are unable to complete it. We noticed that we have a message at the very bottom of certain pages saying, “Total Queries: xxx” (the number varies but right now it is 166) as well as “SAVEQUERIES must be defined to show the query log.” We realized that we have a lot of old events, job postings, etc. that are inactive but probably taking up enough memory to cause issues. Now, when we have tried to delete old events to free up space and try and fix these issues, it is throwing us a critical error. I just saw this on a forum and would be interested in how to turn off SAVEQUERIES if it is on bc that could also be what is affecting our site and registration:

The SAVEQUERIES definition saves the database queries to an array and that array can be displayed to help analyze those queries. The constant defined as true causes each query to be saved, how long that query took to execute, and what function called it.

define( ‘SAVEQUERIES’, true );
The array is stored in the global $wpdb->queries.

NOTE: This will have a performance impact on your site, so make sure to turn this off when you aren’t debugging.

Can anyone help me out?


  • Support Staff

March 8, 2023 at 1:47 pm

Hi there,

We have been having a lot of issues with attendees trying to register for events but they receive a security error and are unable to complete it.

Do you have the exact error being thrown? There are a few security related errors so I need the text displayed to narrow this down.

I’m not so sure SAVEQUERIES is what is causing your problem and I’ll happily tell you how to disable it, however, to do so you need FTP/File Manager access to the files on your site.

Within the root directory of your site will be a wp-config.php file, you need to edit that.

Within that it sounds like you have define( 'SAVEQUERIES', true );

Just either comment is out by adding // at the beginning of it, so:

//define( 'SAVEQUERIES', true );

Or remove that from the file.

March 14, 2023 at 10:01 pm

I am having this exact same issue.
I checked my wp-config.php file and there is no
define( ‘SAVEQUERIES’, true );
line in the file at all.
Any other ideas what could be going on?

March 15, 2023 at 2:10 am

Here is a screenshot:
Total Queries


  • Support Staff

March 15, 2023 at 6:24 am

I think there is some confusion here which is why I said above I’m not so sure SAVEQUERIES is the problem.

The above ‘Total Queries’ is from Event Espresso adding the details into the admin and its saying SAVEQUERIES needs to be enabled for more details on the queries being run. A count of the total number of queries is just taking directly from the WPDB class with $wpdb->num_queries and is not slowing down your site.

If you don’t have define( 'SAVEQUERIES', true ); within your wp-config.php file the SAVEQUERIES is not enabled.


So, let’s take SAVEQUEIRES out of the equation for a little.

What is the issue you are running into?

March 15, 2023 at 6:33 am

Hi Tony,
Thanks for your reply.So far the only issue I am having is that the text message is being displayed in the bottom-left hand corner of the admin interface. Sometimes the text gets in the way of something like a button displaying behind the text message. When the text message is ontop of a button, the button is not able to be clicked on.


  • Support Staff

March 15, 2023 at 8:30 am

Which pages are you seeing the above on? Its set not to load by default so trying to work out where this if from.

Can you post a screenshot of the pull page? (You can set you reply to be private)

March 15, 2023 at 4:03 pm

This reply has been marked as private.


  • Support Staff

March 16, 2023 at 1:23 pm

Hmm, so yeah, that really shouldn’t be loading there unless the code has been changed.

Are you comfortable with FTP/File Manager? If so can you check something on your site?

Within /wp-content/event-espresso/includes/functions/admin.php

Around line 1423 should be:

function espresso_admin_performance($show = 0) {

Does yours have $show = 1? If so, change it to 0

March 16, 2023 at 5:06 pm

Line 1423 has $show = 0:

function espresso_admin_performance($show = 0) {

For what its worth I think this first showed up after upgrading the site to PHP8.
Dont know if that is any relevance or not.


  • Support Staff

March 16, 2023 at 5:55 pm

Doh! Can’t believe I didn’t think of PHP8, thats exactly what it is.

EE3 is not officially PHP8 compatible and switching one of my EE3 test sites to using PHP8 I see the same issue.

You can short circuit the above by adding return $show; right after the function espresso_admin_performance($show = 0) { line.

We don’t have any plans on rewriting EE3 to be PHP8 compatible as its now our legacy product and support for it will be ending within the next 12 months in favour of EE4.

March 16, 2023 at 7:03 pm

Thanks Tony,
That worked perfectly!!
The issue is now resolved.
Just thinking ahead now… Is there an upgrade path from EE3 to EE4?
I have not checked the documentation for this but I plan to.
Thanks again for your excellent support – very much appreciated!!


  • Support Staff

March 17, 2023 at 4:51 am

Is there an upgrade path from EE3 to EE4?

Sure is! When you install EE4 it will check for EE3 data and offer to migrate that data over for you, you just need to run through all the migration steps on screen.

However, without meaning to scare you off, EE4 is a very different system to EE3, its build more towards ‘The WordPress Way’ and integrates much more with your sites theme than EE3 does. So with that, we highly recommend you create a development copy of the site and install EE4 there first, run through the migrations there and confirm everything works as expected.

It’s better to do that than to do it live and find your theme is doing something totally unexpected which breaks the EE output and it’s a mad panic to fix it. Dev/Staging gives you the chance to work through any issues so you’re aware of them first.

March 17, 2023 at 4:25 pm

Hi Tony,
Thanks for all your help and advice. It is very much appreciated.
Will be sure to follow your recommendations when the time comes to upgrade to EE4!
Thanks again and best regards


  • Support Staff

March 17, 2023 at 4:28 pm

You’re most welcome.

When you do set up the dev/staging site and run migrations we are more than happy to work through any issues that come up and advise from there.

March 17, 2023 at 4:57 pm

Awesome – Thank you!

The support post ‘Events Issues’ 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