Support

Home Forums Event Espresso Premium Events list view showing "Sorry no results"

Events list view showing "Sorry no results"

Posted: April 23, 2024 at 7:59 am


admin@pesgb.org.uk

April 23, 2024 at 7:59 am

Good day, our events page seems to not display any sort of results here https://www.ges-gb.org.uk/upcoming-events


admin@pesgb.org.uk

April 23, 2024 at 8:01 am

We use the theme PESGB


Tony

  • Support Staff

April 23, 2024 at 9:25 am

Hi there,

That output is something custom but currently it is throwing a fatal error on the ajax request it uses to generate the events.

If you check the server error logs around the time of loading that page can you see any errors there?


admin@pesgb.org.uk

April 23, 2024 at 11:15 am

11:03 UTC] WordPress database error Table ‘gvyvchjyjn.wp_3_umbrella_task_backup’ doesn’t exist for query SELECT tas.* FROM wp_3_umbrella_task_backup tas WHERE tas.status = ‘in_progress’ made by include(‘phar:///usr/local/bin/wp/php/boot-phar.php’), include(‘phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php’), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->run_command_and_exit, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, Cron_Event_Command->run, Cron_Event_Command::run_event, do_action_ref_array(‘wp_umbrella_task_backup_run_queue’), WP_Hook->do_action, WP_Hook->apply_filters, WPUmbrella\Actions\Queue\Scheduler\BackupTaskQueueRunner->runQueueRunner, WPUmbrella\Services\Scheduler\ScheduleTaskBackup->isAllowed, WPUmbrella\Services\Repository\TaskBackupRepository->hasAtLeastOneTaskInProgress, WPUmbrella\Services\Repository\TaskBackupRepository->getTasksInProgress
[23-Apr-2024 17:11:03 UTC] WordPress database error Table ‘gvyvchjyjn.wp_3_umbrella_task_backup’ doesn’t exist for query SELECT tas.* FROM wp_3_umbrella_task_backup tas WHERE tas.jobId IS NULL AND tas.status IS NULL ORDER BY tas.date_schedule ASC LIMIT 1 made by include(‘phar:///usr/local/bin/wp/php/boot-phar.php’), include(‘phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php’), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->run_command_and_exit, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, Cron_Event_Command->run, Cron_Event_Command::run_event, do_action_ref_array(‘wp_umbrella_task_backup_run_queue’), WP_Hook->do_action, WP_Hook->apply_filters, WPUmbrella\Actions\Queue\Scheduler\BackupTaskQueueRunner->runQueueRunner, WPUmbrella\Services\Scheduler\ScheduleTaskBackup->execute, WPUmbrella\Services\Repository\TaskBackupRepository->getNextTask
[23-Apr-2024 17:11:03 UTC] WordPress database error Table ‘gvyvchjyjn.wp_3_umbrella_backup’ doesn’t exist for query SELECT bac.* FROM wp_3_umbrella_backup bac WHERE bac.status = ‘in_progress’ made by include(‘phar:///usr/local/bin/wp/php/boot-phar.php’), include(‘phar:///usr/local/bin/wp/vendor/wp-cli/wp-cli/php/wp-cli.php’), WP_CLI\bootstrap, WP_CLI\Bootstrap\LaunchRunner->process, WP_CLI\Runner->start, WP_CLI\Runner->run_command_and_exit, WP_CLI\Runner->run_command, WP_CLI\Dispatcher\Subcommand->invoke, call_user_func, WP_CLI\Dispatcher\CommandFactory::WP_CLI\Dispatcher\{closure}, call_user_func, Cron_Event_Command->run, Cron_Event_Command::run_event, do_action_ref_array(‘wp_umbrella_task_backup_run_queue’), WP_Hook->do_action, WP_Hook->apply_filters, WPUmbrella\Actions\Queue\Scheduler\BackupTaskQueueRunner->runQueueRunner, WPUmbrella\Services\Scheduler\ScheduleTaskBackup->execute, WPUmbrella\Services\Repository\BackupRepository->getBackupInProgress
[23-Apr-2024 17:13:30 UTC] WordPress database error Not unique table/alias: ‘wp_esp_datetime’ for query SELECT SQL_CALC_FOUND_ROWS wp_posts.*, wp_esp_datetime.* , wp_postmeta.meta_value as event_options_featured, wp_esp_datetime.DTT_EVT_start
FROM wp_posts INNER JOIN wp_postmeta ON ( wp_posts.ID = wp_postmeta.post_id ) INNER JOIN wp_esp_datetime ON ( wp_posts.ID = wp_esp_datetime.EVT_ID ) LEFT JOIN wp_esp_datetime ON wp_posts.ID = wp_esp_datetime.EVT_ID
WHERE 1=1 AND (
wp_postmeta.meta_key = ‘event_options_featured’
) AND wp_posts.post_type = ‘espresso_events’ AND ((wp_posts.post_status = ‘publish’ OR wp_posts.post_status = ‘cancelled’ OR wp_posts.post_status = ‘postponed’ OR wp_posts.post_status = ‘sold_out’)) AND ( wp_esp_datetime.DTT_EVT_end >= NOW() )
GROUP BY wp_posts.ID
ORDER BY event_options_featured DESC, wp_esp_datetime.DTT_EVT_start ASC
LIMIT 0, 9 made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/pesgb/archive-espresso_events.php’), include(‘/themes/pesgb/partials/event-index.php’), EventEspressoHelper::getEventsPaginatedSegment, WP_Query->__construct, WP_Query->query, WP_Query->get_posts


admin@pesgb.org.uk

April 23, 2024 at 11:16 am

Hi Tony this is what i get listed above.


Tony

  • Support Staff

April 23, 2024 at 2:34 pm

Hi there,

The above error means you have this snippet on your site:

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

Comment that code out from the site, does the above page work again?


admin@pesgb.org.uk

April 24, 2024 at 2:11 am

Hi Tony, I checked the functions.php and could not find that snippet of code.


Tony

  • Support Staff

April 24, 2024 at 2:27 am

Hmm, can I take a look?

If so send temp login details over using this form:

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


admin@pesgb.org.uk

April 24, 2024 at 2:34 am

Hi Tony, yes I will add it now.


admin@pesgb.org.uk

April 24, 2024 at 2:39 am

Hi Tony I just sent it through now.


Tony

  • Support Staff

April 24, 2024 at 3:47 am

Hi there,

Can you recheck those credentials please, neither the WP Admin or FTP credentials are working for me.

WP Admin shows unknown email address and FTP shows access denied.


admin@pesgb.org.uk

April 24, 2024 at 3:59 am

Hi Tony,

I can confirm the sftp credentials work I recently connected via Filezilla to check functions.php file.

For the wp credentials I believe I sent the incorrect password apologies I will resend them again.


Tony

  • Support Staff

April 24, 2024 at 4:21 am

Both of those credentials are completely different to the previous submission, those new ones work 🙂

Looking now


admin@pesgb.org.uk

April 24, 2024 at 4:32 am

Great thanks! Sorry about that.


Tony

  • Support Staff

April 24, 2024 at 6:02 am

Ok, so there’s a couple of options here.

The code currently causing the errors which are forcing no events to show is in:

\themes\pesgb\includes\eventespressohelper.php

Any of the functions hooking into posts_join should first check to confirm if the table they are about to add as a join hasn’t been added already. Thats a relatively straightforward fix and a cuick example would be to go from this:

public static function filterEventLocationJoin($sql) {
    // Use Event Espresso to get the names of event and event venue tables.
    $eventVenueTable = EEM_Event_Venue::instance()->table();
    $eventTable = EEM_Event::instance()->table();
    // Construct join clause
    $sql .= ' LEFT JOIN ' . $eventVenueTable .' ON '. $eventTable . '.ID = ' . $eventVenueTable . '.' . EEM_Event::instance()->primary_key_name();
    // Pass SQL back.
    return $sql;
}

To this:

public static function filterEventLocationJoin($sql) {

    // Use Event Espresso to get the names of event and event venue tables.
    $eventVenueTable = EEM_Event_Venue::instance()->table();
    $eventTable = EEM_Event::instance()->table();
    if (
        strpos($sql, $eventVenueTable) === false
    ){
        // Construct join clause
        $sql .= ' LEFT JOIN ' . $eventVenueTable .' ON '. $eventTable . '.ID = ' . $eventVenueTable . '.' . EEM_Event::instance()->primary_key_name();
    }
    // Pass SQL back.
    return $sql;
}

The only difference between those is the function checks is $sql already includes the table name value set in $eventVenueTable, if not, it adds it as a join. That will prevent multiple joins with the same table name (which is where the error is currently coming from).

However, I downloaded the site’s theme locally to find the above code location so I fixed those to confirm it worked on my local site, which it did, but then another fatal is thrown from constructing the event list items in your theme.

Fatal error: Uncaught Error: Call to a member function is_active() on string in /pesgb/partials/event-index-item-list.php on line 42

Thats this code $eventPost->EE_Event->is_active()

For you to be getting that error, it means EE_Event hasn’t been set. I tested version 5.0.17.p and it worked there, so this is from a recent change to how EE handles WP_Query.

The above code changes for functions using the posts_join filter should be done regardless, but EE_Event should also be set above and I’m not sure why it’s not. Fixing it can be done by adding some code to your template calls and that may well be the ‘proper’ solution for this but I’m going to open a discussion about it with our developers to check. In the meantime I can send you a copy of 5.0.17.p so your event list gets back up and running again if that helps?


admin@pesgb.org.uk

April 24, 2024 at 6:07 am

Hi Tony, yes please if you can send version 5.0.17 and then if you could also somehow keep me updated about a fix as we regular update or plugins on the site.


Tony

  • Support Staff

April 24, 2024 at 6:18 am

This reply has been marked as private.


admin@pesgb.org.uk

April 24, 2024 at 6:52 am

Thank you so much I can now see the events again.


Rio

  • Support Staff

April 24, 2024 at 6:37 pm

Awesome. If you need anything, feel free to reach us again.

thanks

You must be logged in to reply to this support post. Sign In or Register for an Account

Event Espresso