Unknown column wp_tec_occurrences.start_date in field list
-
On a website I see lots of these errors in the error log and it looks like the query is just wrong. Can you please figure out where this executed?
[15-May-2024 03:06:34 UTC] WordPress database error Unknown column 'wpbnn_tec_occurrences.start_date' in 'field list' for query SELECT wpbnn_posts.*, CAST( wpbnn_tec_occurrences.start_date AS DATETIME ) AS event_date FROM wpbnn_posts LEFT JOIN wpbnn_postmeta ON ( wpbnn_posts.ID = wpbnn_postmeta.post_id AND wpbnn_postmeta.meta_key = '_EventHideFromUpcoming' ) LEFT JOIN wpbnn_postmeta AS mt1 ON ( wpbnn_posts.ID = mt1.post_id ) LEFT JOIN wpbnn_postmeta AS mt2 ON ( wpbnn_posts.ID = mt2.post_id ) WHERE 1=1 AND ( wpbnn_postmeta.post_id IS NULL AND ( mt1.meta_key = '_EventEndDate' AND CAST(mt1.meta_value AS DATETIME) <= '2024-04-06 00:00:00' ) AND ( mt2.meta_key = '_EventStartDate' AND CAST(mt2.meta_value AS DATETIME) >= '2024-02-25 00:00:00' ) ) AND wpbnn_posts.post_type IN ('post', 'page', 'attachment', 'revision', 'nav_menu_item', 'custom_css', 'customize_changeset', 'oembed_cache', 'user_request', 'wp_block', 'wp_template', 'wp_template_part', 'wp_global_styles', 'wp_navigation', 'wp_font_family', 'wp_font_face', 'pretty-link', 'kadence_form', 'wpcf7_contact_form', 'video', 'project', 'partners', 'glossary', 'kadence_lottie', 'tribe_venue', 'tribe_organizer', 'tribe_events', 'tribe-ea-record', 'deleted_event', 'cool_timeline') AND ((wpbnn_posts.post_status = 'publish')) GROUP BY wpbnn_tec_occurrences.occurrence_id ORDER BY event_date ASC, wpbnn_posts.post_date ASC made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/the-events-calendar/src/views/v2/default-template.php'), get_header, locate_template, load_template, require_once('/themes/bijniernettwee/header.php'), wp_head, do_action('wp_head'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Front_End_Integration->call_wpseo_head, do_action('wpseo_head'), WP_Hook->do_action, WP_Hook->apply_filters, Yoast\WP\SEO\Integrations\Front_End_Integration->present_head, Yoast\WP\SEO\Presenters\Schema_Presenter->present, Yoast\WP\SEO\Presenters\Schema_Presenter->get, Yoast\WP\SEO\Presentations\Abstract_Presentation->__get, Yoast\WP\SEO\Presentations\Indexable_Presentation->generate_schema, Yoast\WP\SEO\Generators\Schema_Generator->generate, Yoast\WP\SEO\Generators\Schema_Generator->generate_graph, TEC\Events\Integrations\Plugins\WordPress_SEO\Events_Schema->generate, TEC\Events\Integrations\Plugins\WordPress_SEO\Events_Schema->get_month_events, tribe_get_events, Tribe__Events__Query::getEvents, WP_Query->get_posts [15-May-2024 03:06:34 UTC] WordPress database error Unknown column 'wpbnn_tec_occurrences.start_date' in 'field list' for query SELECT SQL_CALC_FOUND_ROWS wpbnn_posts.ID, CAST( wpbnn_tec_occurrences.start_date AS DATETIME ) AS event_date FROM wpbnn_posts WHERE 1=1 AND wpbnn_posts.post_password != '' AND wpbnn_posts.post_type IN ('post', 'page', 'attachment', 'revision', 'nav_menu_item', 'custom_css', 'customize_changeset', 'oembed_cache', 'user_request', 'wp_block', 'wp_template', 'wp_template_part', 'wp_global_styles', 'wp_navigation', 'wp_font_family', 'wp_font_face', 'pretty-link', 'kadence_form', 'wpcf7_contact_form', 'video', 'project', 'partners', 'glossary', 'kadence_lottie', 'tribe_venue', 'tribe_organizer', 'tribe_events', 'tribe-ea-record', 'deleted_event', 'cool_timeline') AND ((wpbnn_posts.post_status <> 'trash' AND wpbnn_posts.post_status <> 'auto-draft')) GROUP BY wpbnn_tec_occurrences.occurrence_id ORDER BY event_date ASC, wpbnn_posts.post_date ASC LIMIT 0, 50 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/plugins/the-events-calendar/src/views/v2/default-template.php'), Tribe\Events\Views\V2\Template_Bootstrap->get_view_html, Tribe\Events\Views\V2\View->get_html, Tribe\Events\Views\V2\View->maybe_get_cached_html, Tribe\Events\Views\V2\View->should_cache_html, Tribe\Events\Views\V2\View->get_password_protected_events_count, Tribe__Repository->found, WP_Query->get_posts
The table
wpbnn_tec_occurrences
is referenced without being loaded (wpbnn_
is the prefix for this site)I’ve seen other posts about this error, but these were closed without a solution. It’s not a recent issue.
- You must be logged in to reply to this topic.