Support

Home Forums Event Espresso Premium 5.0.18 update broke events table web page – table view and query related?

5.0.18 update broke events table web page – table view and query related?

Posted: March 19, 2024 at 3:13 pm


baystate

March 19, 2024 at 3:13 pm

Hi Support Team,

Looks like lots of trouble with 5.0.18, but I did not find any topics with precisely my problem.

We have restored our PRD site with EE 5.0.17 so PRD website is OK, but …

PLEASE ADVISE if we:
A. Should stay on 5.0.17 and wait for 5.0.19 – if our problems (outlined below) result from something that will be fixed on your end
—OR—
B. Need to do things on our end to address the errors outlined below.

RUNNING: WP 6.4.3, PHP 8.2, EE Table View Template 1.3.9, variety of other EE plugins all in latest updates prior to 13 March 2024.

PROBLEM: After update to 5.0.18, our “Register” page (events list/table) displays the message: “There has been a critical error on this website” without any error details (just “Learn more about troubleshooting WordPress.” Link). The page displays no event details and the format/design of the page is very strange (looks like a document with the old table column headers displaying oddly but no site-wide header or footer).

Here’s what the “Register” page should look like (PRD site back on 5.0.17): https://baystateskatingschool.org/classes/register/
Here’s what the “Register” page looks like with 5.0.18 (on our STG site): https://baystateskastg.wpengine.com/classes/register/

LOGS:

We seem to have both query-related errors and table view errors – though both are identified as database errors. Although STG site logs only show query type error, whereas PRD logged both query and table view types, both sites had the exactly same problem with the Register page.

The STG site logs only seem to show an apparently query type of error:

{
“installName”: “baystateskastg”,
“environment”: “STAGE”,
“type”: “error”,
“date”: “2024-03-19T19:44:07.000Z”,
“severity”: “notice”,
“client”: “71.234.99.153:0] WordPress database error Not unique table/alias: ‘hg99zb93_esp_datetime’ for query \\n\\t\\t\\tSELECT SQL_CALC_FOUND_ROWS hg99zb93_posts.*, hg99zb93_esp_datetime.* , MIN( hg99zb93_esp_datetime.DTT_EVT_start ) as event_start_date \\n\\t\\t\\tFROM hg99zb93_posts INNER JOIN hg99zb93_esp_datetime ON ( hg99zb93_posts.ID = hg99zb93_esp_datetime.EVT_ID ) INNER JOIN hg99zb93_esp_datetime ON ( hg99zb93_posts.ID = hg99zb93_esp_datetime.EVT_ID ) INNER JOIN hg99zb93_esp_datetime_ticket AS Datetime_Ticket ON ( Datetime_Ticket.DTT_ID=hg99zb93_esp_datetime.DTT_ID ) INNER JOIN hg99zb93_esp_ticket AS Ticket ON ( Datetime_Ticket.TKT_ID=Ticket.TKT_ID ) \\n\\t\\t\\tWHERE 1=1 AND ((hg99zb93_posts.post_type = ‘espresso_events’ AND (hg99zb93_posts.post_status = ‘publish’ OR hg99zb93_posts.post_status = ‘cancelled’ OR hg99zb93_posts.post_status = ‘postponed’ OR hg99zb93_posts.post_status = ‘sold_out’ \\nOR hg99zb93_posts.post_status = ‘private’))) AND hg99zb93_esp_datetime.DTT_EVT_end > ‘2024-03-19 19:44:07’ AND hg99zb93_esp_datetime.DTT_deleted = 0 AND Ticket.TKT_end_date > \”2024-03-19 19:44:07\” AND Ticket.TKT_start_date < \”2024-03-19 19:44:07\” AND Ticket.TKT_deleted=0\\n\\t\\t\\tGROUP BY hg99zb93_posts.ID \\n\\t\\t\\tORDER BY event_start_date ASC\\n\\t\\t\\tLIMIT 0, 10\\n\\t\\t /* From [baystateskastg.wpengine.com/?event_list=iframe] in [/nas/content/live/baystateskastg/wp-content/plugins/event-espresso-core-reg/core/domain/services/wp_queries/EventListQuery.php:77″,
“message”: “*/ made by require(‘wp-blog-header.php’), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, do_action_ref_array(‘pre_get_posts’), WP_Hook->do_action, WP_Hook->apply_filters, EE_Front_Controller->pre_get_posts, EE_Module_Request_Router->resolve_route, EE_Module_Request_Router->_module_router, EED_Events_Archive->event_list_iframe, EventEspresso\\\\modules\\\\events_archive\\\\EventsArchiveIframe->__construct, EventEspresso\\\\core\\\\domain\\\\entities\\\\shortcodes\\\\EspressoEvents->processShortcode, EventEspresso\\\\core\\\\domain\\\\services\\\\wp_queries\\\\EventListQuery->__construct, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, referer: https://baystateskastg.wpengine.com/wp-admin/admin.php?page=espresso_events“,
“uuid”: “69960475-b5a1-4c64-acfd-2e319717b587”
}

The PRD logs reported two types of errors:

1. The query type of error identical to STG above
2. And what appears to be a table view template error:

{
“installName”: “bsss”,
“environment”: “PROD”,
“type”: “error”,
“date”: “2024-03-19T20:03:48.000Z”,
“severity”: “notice”,
“client”: “71.234.99.153:0] WordPress database error Not unique table/alias: ‘hg99zb93_esp_datetime’ for query \\n\\t\\t\\tSELECT SQL_CALC_FOUND_ROWS hg99zb93_posts.*, hg99zb93_esp_datetime.* , MIN( hg99zb93_esp_datetime.DTT_EVT_start ) as event_start_date \\n\\t\\t\\tFROM hg99zb93_posts INNER JOIN hg99zb93_esp_datetime ON ( hg99zb93_posts.ID = hg99zb93_esp_datetime.EVT_ID ) INNER JOIN hg99zb93_esp_datetime ON ( hg99zb93_posts.ID = hg99zb93_esp_datetime.EVT_ID ) INNER JOIN hg99zb93_esp_datetime_ticket AS Datetime_Ticket ON ( Datetime_Ticket.DTT_ID=hg99zb93_esp_datetime.DTT_ID ) INNER JOIN hg99zb93_esp_ticket AS Ticket ON ( Datetime_Ticket.TKT_ID=Ticket.TKT_ID ) \\n\\t\\t\\tWHERE 1=1 AND ((hg99zb93_posts.post_type = ‘espresso_events’ AND (hg99zb93_posts.post_status = ‘publish’ OR hg99zb93_posts.post_status = ‘cancelled’ OR hg99zb93_posts.post_status = ‘postponed’ OR hg99zb93_posts.post_status = ‘sold_out’ \\nOR hg99zb93_posts.post_status = ‘private’))) AND hg99zb93_esp_datetime.DTT_EVT_end > ‘2024-03-19 20:03:48’ AND hg99zb93_esp_datetime.DTT_deleted = 0 AND Ticket.TKT_end_date > \”2024-03-19 20:03:48\” AND Ticket.TKT_start_date < \”2024-03-19 20:03:48\” AND Ticket.TKT_deleted=0\\n\\t\\t\\tGROUP BY hg99zb93_posts.ID \\n\\t\\t\\tORDER BY hg99zb93_posts.post_title ASC\\n\\t\\t\\tLIMIT 0, 1000\\n\\t\\t /* From [baystateskatingschool.org/classes/register/] in [/nas/content/live/bsss/wp-content/plugins/eea-events-table-view-template/EES_Espresso_Events_Table_Template.shortcode.php:404″,
“message”: “*/ made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/playhockey/page.php’), get_template_part, locate_template, load_template, require(‘/themes/playhockey/content-page.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, vc_do_shortcode, WPBakeryShortCode->output, WPBakeryShortCode_Vc_Row->content, WPBakeryShortCode->loadTemplate, require(‘/plugins/js_composer/include/templates/shortcodes/vc_row.php’), wpb_js_remove_wpautop, do_shortcode, preg_replace_callback, do_shortcode_tag, vc_do_shortcode, WPBakeryShortCode->output, WPBakeryShortCode->content, WPBakeryShortCode->loadTemplate, require(‘/plugins/js_composer/include/templates/shortcodes/vc_column.php’), wpb_js_remove_wpautop, do_shortcode, preg_replace_callback, do_shortcode_tag, vc_do_shortcode, WPBakeryShortCode->output, WPBakeryShortCode->content, WPBakeryShortCode->loadTemplate, require(‘/plugins/js_composer/include/templates/shortcodes/vc_column_text.php’), wpb_js_remove_wpautop, do_shortcode, preg_replace_callback, do_shortcode_tag, EES_Espresso_Events_Table_Template->process_shortcode, EE_Events_Table_Template_Query->__construct, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, referer: https://baystateskatingschool.org/“,
“uuid”: “69213372-d19b-4df6-9e03-abd24fedfdc1”
}

As noted above, please advise whether we should just stay on 5.0.17 and wait for 5.0.19 or if/what we’d need to do to address the above.

Thanks,
Caryn


Rio

  • Support Staff

March 19, 2024 at 6:51 pm

Hello,

5.0.19 is now available. We expect that the issues in .18 is resolved. Can you update your plugin and let us know if you experience any problem.

thanks.


Tony

  • Support Staff

March 19, 2024 at 7:07 pm

This reply has been marked as private.


baystate

March 20, 2024 at 5:27 am

Thank you both.

I’ve upgraded to 5.0.19 in STG. Good news: Register (event list) page now displays with proper formatting (header, footer, etc.). Bad news: the actual events table is completely missing: https://baystateskastg.wpengine.com/classes/register/. Again, for reference, this is what it should look like: https://baystateskatingschool.org/classes/register/

LOGS:
This time, the STG site got both the query error and the table view template error. With both 5.0.18 and 5.0.19 some of these errors show twice in the logs, but the text of the error msg is virtually identical except for “uuid” at the end so only posting one of each.

Query error:

{
“installName”: “baystateskastg”,
“environment”: “STAGE”,
“type”: “error”,
“date”: “2024-03-20T10:56:01.000Z”,
“severity”: “notice”,
“client”: “71.234.99.153:0] WordPress database error Not unique table/alias: ‘hg99zb93_esp_datetime’ for query \\n\\t\\t\\tSELECT SQL_CALC_FOUND_ROWS hg99zb93_posts.*, hg99zb93_esp_datetime.* , MIN( hg99zb93_esp_datetime.DTT_EVT_start ) as event_start_date \\n\\t\\t\\tFROM hg99zb93_posts INNER JOIN hg99zb93_esp_datetime ON ( hg99zb93_posts.ID = hg99zb93_esp_datetime.EVT_ID ) INNER JOIN hg99zb93_esp_datetime ON ( hg99zb93_posts.ID = hg99zb93_esp_datetime.EVT_ID ) INNER JOIN hg99zb93_esp_datetime_ticket AS Datetime_Ticket ON ( Datetime_Ticket.DTT_ID=hg99zb93_esp_datetime.DTT_ID ) INNER JOIN hg99zb93_esp_ticket AS Ticket ON ( Datetime_Ticket.TKT_ID=Ticket.TKT_ID ) \\n\\t\\t\\tWHERE 1=1 AND ((hg99zb93_posts.post_type = ‘espresso_events’ AND (hg99zb93_posts.post_status = ‘publish’ OR hg99zb93_posts.post_status = ‘cancelled’ OR hg99zb93_posts.post_status = ‘postponed’ OR hg99zb93_posts.post_status = ‘sold_out’ \\nOR hg99zb93_posts.post_status = ‘private’))) AND hg99zb93_esp_datetime.DTT_EVT_end > ‘2024-03-20 10:56:01’ AND hg99zb93_esp_datetime.DTT_deleted = 0 AND Ticket.TKT_end_date > \”2024-03-20 10:56:01\” AND Ticket.TKT_start_date < \”2024-03-20 10:56:01\” AND Ticket.TKT_deleted=0\\n\\t\\t\\tGROUP BY hg99zb93_posts.ID \\n\\t\\t\\tORDER BY event_start_date ASC\\n\\t\\t\\tLIMIT 0, 10\\n\\t\\t /* From [baystateskastg.wpengine.com/?event_list=iframe] in [/nas/content/live/baystateskastg/wp-content/plugins/event-espresso-core-reg/core/domain/services/wp_queries/EventListQuery.php:77″,
“message”: “*/ made by require(‘wp-blog-header.php’), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts, do_action_ref_array(‘pre_get_posts’), WP_Hook->do_action, WP_Hook->apply_filters, EE_Front_Controller->pre_get_posts, EE_Module_Request_Router->resolve_route, EE_Module_Request_Router->_module_router, EED_Events_Archive->event_list_iframe, EventEspresso\\\\modules\\\\events_archive\\\\EventsArchiveIframe->__construct, EventEspresso\\\\core\\\\domain\\\\entities\\\\shortcodes\\\\EspressoEvents->processShortcode, EventEspresso\\\\core\\\\domain\\\\services\\\\wp_queries\\\\EventListQuery->__construct, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, referer: https://baystateskastg.wpengine.com/wp-admin/admin.php?page=espresso_events“,
“uuid”: “cd961b1e-a7f7-43dd-a90e-0826dcd07848”
}

Table view template error:

{
“installName”: “baystateskastg”,
“environment”: “STAGE”,
“type”: “error”,
“date”: “2024-03-20T10:56:22.000Z”,
“severity”: “notice”,
“client”: “71.234.99.153:0] WordPress database error Not unique table/alias: ‘hg99zb93_esp_datetime’ for query \\n\\t\\t\\tSELECT SQL_CALC_FOUND_ROWS hg99zb93_posts.*, hg99zb93_esp_datetime.* , MIN( hg99zb93_esp_datetime.DTT_EVT_start ) as event_start_date \\n\\t\\t\\tFROM hg99zb93_posts INNER JOIN hg99zb93_esp_datetime ON ( hg99zb93_posts.ID = hg99zb93_esp_datetime.EVT_ID ) INNER JOIN hg99zb93_esp_datetime ON ( hg99zb93_posts.ID = hg99zb93_esp_datetime.EVT_ID ) INNER JOIN hg99zb93_esp_datetime_ticket AS Datetime_Ticket ON ( Datetime_Ticket.DTT_ID=hg99zb93_esp_datetime.DTT_ID ) INNER JOIN hg99zb93_esp_ticket AS Ticket ON ( Datetime_Ticket.TKT_ID=Ticket.TKT_ID ) \\n\\t\\t\\tWHERE 1=1 AND ((hg99zb93_posts.post_type = ‘espresso_events’ AND (hg99zb93_posts.post_status = ‘publish’ OR hg99zb93_posts.post_status = ‘cancelled’ OR hg99zb93_posts.post_status = ‘postponed’ OR hg99zb93_posts.post_status = ‘sold_out’ \\nOR hg99zb93_posts.post_status = ‘private’))) AND hg99zb93_esp_datetime.DTT_EVT_end > ‘2024-03-20 10:56:22’ AND hg99zb93_esp_datetime.DTT_deleted = 0 AND Ticket.TKT_end_date > \”2024-03-20 10:56:22\” AND Ticket.TKT_start_date < \”2024-03-20 10:56:22\” AND Ticket.TKT_deleted=0\\n\\t\\t\\tGROUP BY hg99zb93_posts.ID \\n\\t\\t\\tORDER BY hg99zb93_posts.post_title ASC\\n\\t\\t\\tLIMIT 0, 1000\\n\\t\\t /* From [baystateskastg.wpengine.com/classes/register/] in [/nas/content/live/baystateskastg/wp-content/plugins/eea-events-table-view-template/EES_Espresso_Events_Table_Template.shortcode.php:404″,
“message”: “*/ made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/playhockey/page.php’), get_template_part, locate_template, load_template, require(‘/themes/playhockey/content-page.php’), the_content, apply_filters(‘the_content’), WP_Hook->apply_filters, do_shortcode, preg_replace_callback, do_shortcode_tag, vc_do_shortcode, WPBakeryShortCode->output, WPBakeryShortCode_Vc_Row->content, WPBakeryShortCode->loadTemplate, require(‘/plugins/js_composer/include/templates/shortcodes/vc_row.php’), wpb_js_remove_wpautop, do_shortcode, preg_replace_callback, do_shortcode_tag, vc_do_shortcode, WPBakeryShortCode->output, WPBakeryShortCode->content, WPBakeryShortCode->loadTemplate, require(‘/plugins/js_composer/include/templates/shortcodes/vc_column.php’), wpb_js_remove_wpautop, do_shortcode, preg_replace_callback, do_shortcode_tag, vc_do_shortcode, WPBakeryShortCode->output, WPBakeryShortCode->content, WPBakeryShortCode->loadTemplate, require(‘/plugins/js_composer/include/templates/shortcodes/vc_column_text.php’), wpb_js_remove_wpautop, do_shortcode, preg_replace_callback, do_shortcode_tag, EES_Espresso_Events_Table_Template->process_shortcode, EE_Events_Table_Template_Query->__construct, WP_Query->__construct, WP_Query->query, WP_Query->get_posts, referer: https://baystateskastg.wpengine.com/“,
“uuid”: “87666e69-bdf0-4fec-abae-68511cae9685”
}

Let me know if you want STG site access details if you want/need to clone. And/or recommend steps on my side.

Thanks so much,
Caryn


Tony

  • Support Staff

March 20, 2024 at 7:52 am

Hi Caryn,

If I can grab staging site credentials that would be great.

You can send those using this form:

https://eventespresso.com/send-login-details/

If I can’t figure it out from there then cloning it locally would be great if your ok with that. I usually use UpDraft to create a backup and download it locally.


Tony

  • Support Staff

March 21, 2024 at 12:38 pm

Found it.

The BSSS Custom Functions plugin has this snippet in it:

https://github.com/eventespresso/ee-code-snippet-library/blob/master/templates/de_ee_filter_events_out_with_expired_tickets.php

That’s one of our own (fairly old now) snippets to exclude events in which all tickets have expired which nw conflicts with how we are handling the query.

For the time being comment out that snippet from the site to fix this, I’ve created a ticket for our developers to investigate further.


baystate

March 21, 2024 at 3:04 pm

Thanks Tony!

I commented out that snippet, which got the events table to appear again – hooray! BUT… This snippet was important for us because we only sell tickets for programs that have 3 classes left (or more). So we don’t want to even show classes with one or two classes left (or sold out classes) because we don’t want users to click and be told they can’t buy after all. You will see on the updated page (after snippet commented out): https://baystateskastg.wpengine.com/classes/register/ that if you click on Register next to a program with one class left, you get a page that says “We’re sorry but ticket sales have ended.” but we don’t want to even display programs like this on the Register/Events page in the first place. That’s part of what this custom functions plugin was for.

So is there a modified snippet we can use? Is that what you meant by “I’ve created a ticket for our developers to investigate further” – that you are going to see what could be done instead?

Thanks, Caryn


Tony

  • Support Staff

March 26, 2024 at 6:32 am

Hi Caryn,

Sorry for the delay.

To explain a little, in version 5.0.18.p we changed how EE handles the main WP_Query to work around some of the issues we’ve been running into with other plugins doing weird and wonderful things with the main query.

(To summarize EE jumps through a LOT of hoops to not alter the main query unless we actually need to do so, even then we don’t replace the main query itself but inject details into it. The problems come when other plugins jump in, swap out the main query, or do a bunch of other craziness which we’ve been working through and we added some additional logic for when that happens)

This is now causing issues outside of the intended fix and whilst the changes we made are needed we may be forced to revert and rethink, or we continue on and work through any issues with that.

So is there a modified snippet we can use?

I can give you a fix for the snippet, but I’ve been waiting on the discussion mentioned above to confirm which path we work through on this. As I may give you a fix and then you need another because of the path we take from here.

Is that what you meant by “I’ve created a ticket for our developers to investigate further” – that you are going to see what could be done instead?

Correct, right now, the snippet can be updated to fix that particular issue (and if you want it I can send it over to you) but we may include a different fix within core itself.

We will be discussing this more today and I’ll update you once I know more.


baystate

March 28, 2024 at 5:37 am

Thank you, Tony, for your detailed response and explanation. I really appreciate understanding the big picture.

For now, I will wait to hear the outcome of your further discussions. Our ice skating season is almost over, so resolving this is not urgent for us. We will stay on 5.0.17 for our PRD site, and await your update.

Cheers, Caryn

The support post ‘5.0.18 update broke events table web page – table view and query related?’ 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