Home Forums Event Espresso Premium Query Broken after Upgrade to 4.9.39.p

Query Broken after Upgrade to 4.9.39.p

Posted: June 3, 2017 at 9:12 pm


June 3, 2017 at 9:12 pm

Hi, I had been using an old EE_Event_List_Query on my client’s home page to get the next 3 upcoming events. Each event displayed the Event Name, Link, Date and Thumbnail.

Upgrading EE4 to 4.9.39.p seems to have broken that query. I’ve since moved on to the following, but for some reason cannot get the date to display at all (the page display gets thrown off and no dates are shown):

// set up show expired = false
$where = array(
	'Datetime.DTT_EVT_end' => array( '>=', current_time( 'mysql' )),
	'status' => 'publish',
// run the query
if ( class_exists( 'EE_Registry' ) ) :
// Load Event View Helper
$events = EE_Registry::instance()->load_model( 'Event' )->get_all( array(
	'limit' => 3,
	'order_by' => 'Datetime.DTT_EVT_start',
	'order' => 'ASC',
	'group_by' => 'EVT_ID'
// the loop
if ( ! empty( $events )) {
	foreach ( $events as $event ) {
		if ( $event instanceof EE_Event ) {
			echo '<div class="column one_fourth" style="margin-right:0%;">';
			echo '<h4><a href="' . get_permalink( $event->ID() ) . '">' . $event->name() . ' &raquo;</a></h4>';
			echo '</div>';
endif; ?>   

Do you have any suggestions on how I might get the date and thumbnail in this query? I’ve done some searching but everything I try seems to produce this same crash, with no errors in the console.


  • Support Staff

June 5, 2017 at 10:47 pm

Hi there,

I can suggest using the model system. You’ll find some documentation here:–Model-System/

There isn’t much in examples there, so here’s an example that’s similar to the code you’re working with:


June 6, 2017 at 11:00 am

Hi Josh, thanks so much for your help. This is exactly what I needed!

The support post ‘Query Broken after Upgrade to 4.9.39.p’ 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.

Support forum for Event Espresso 3 and Event Espresso 4.
Documentation for EE3 and EE4
Documentation for Event Espresso 3 Documentation for Event Espresso 4

Status: closed

Updated by  karks88 3 years, 1 month ago ago

Topic Tags

Tagged: ,


This topic is: resolved
Do NOT follow this link or you will be banned from the site!