• Hi, I updated to EM version 6.5 in WordPress 6.6.1 and I’m getting the following error messages on the Dashboard. Both these errors disappear when I deactivate EM, so it appears that one of the events databases has become corrupted in the update. Could you please advise on how to fix this? Many thanks in advance for your help.

    WordPress database error: [Unknown column ‘wp_em_bookings.booking_id’ in ‘field list’]
    SELECT COUNT(DISTINCT wp_em_bookings.booking_id) FROM temp_em_bookings LEFT JOIN temp_em_events ON temp_em_bookings.event_id=temp_em_events.event_id WHERE ( event_start >= '2024-07-31 13:07:38' OR (event_end >= '2024-07-31 13:07:38')) AND booking_status=0 AND temp_em_bookings.event_id != 0 ORDER BY booking_date

    Warning: Cannot modify header information – headers already sent by (output started at /customers/f/0/6/prometheustrust.co.uk/httpd.www/wp-includes/class-wpdb.php:1849) in /customers/f/0/6/prometheustrust.co.uk/httpd.www/wp-admin/includes/misc.php on line 1438 Warning: Cannot modify header information – headers already sent by (output started at /customers/f/0/6/prometheustrust.co.uk/httpd.www/wp-includes/class-wpdb.php:1849) in /customers/f/0/6/prometheustrust.co.uk/httpd.www/wp-includes/functions.php on line 7108 Warning: Cannot modify header information – headers already sent by (output started at /customers/f/0/6/prometheustrust.co.uk/httpd.www/wp-includes/class-wpdb.php:1849) in /customers/f/0/6/prometheustrust.co.uk/httpd.www/wp-admin/admin-header.php on line 9

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • To confirm, we’re also seeing this same database error on a client’s website with the same missing table.

    Thanks, Jacob ??

    The database is not corrupted. The error is due to an error in the latest plugin update (it’s assuming the table prefix is “wp_”) in the file wp-content/plugins/events-manager/classes/em-bookings.php on line 708:

    $sql_parts['data']['selectors'] = 'COUNT(DISTINCT wp_em_bookings.booking_id)';

    To fix this that line should be changed to this:

    $sql_parts['data']['selectors'] = "COUNT(DISTINCT ${bookings_table}.booking_id)";

    Hopefully @msykes will fix this with a new release.

    @joneiseman Thank you very much for the update and your input! Could you clarify, we just need to amend line 708 on that file (wp-content/plugins/events-manager/classes/em-bookings.php), and not run any SQL in the database?

    Many thanks,
    Jacob ??

    Yes, that’s correct. You just need to update line 708 in em-bookings.php (no updates to the database are required).

    Plugin Author Marcus

    (@msykes)

    Hello everyone, try the dev version 6.5.0.1, it should fix these issues. We’ll be releasing in the next hour hopefully, just tweaking a few other minor bugs found in the booking admin tables.

    To update to a dev version, you can do it from the dashboard as per these instructions.

Viewing 5 replies - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.