PHP Error: WordPress database error Incorrect DATETIME value: ” for query
-
I get this error in my php log every day. I noticed that I got about 14 of these last night and a few more when I logged into the website this morning. The errors I got last night were all logged over the course of about a minute. They all reference different post IDs (this one references ID 1580). The error occurs twice for each post ID: one error references
tribe_the_next_event_link
and the other error referencestribe_the_prev_event_link
. I have 24 events and none of them are designated as recurring events.I’ve tried saving all the posts as drafts then re-publishing them. I tried updating my single-event.php file with the most updated code. Any help is appreciated. I’ve also looked into my database and it appears all the events have valid start dates and end dates.
This is one of the errors I’m getting:
WordPress database error Incorrect DATETIME value: '' for query SELECT SQL_CALC_FOUND_ROWS (wp_asdfadsf_tec_occurrences.occurrence_id + 10000000) as occurrence_id FROM wp_asdfadsf_posts LEFT JOIN wp_asdfadsf_postmeta ON ( wp_asdfadsf_posts.ID = wp_asdfadsf_postmeta.post_id AND wp_asdfadsf_postmeta.meta_key = '_EventHideFromUpcoming' ) JOIN wp_asdfadsf_tec_occurrences ON wp_asdfadsf_posts.ID = wp_asdfadsf_tec_occurrences.post_id WHERE 1=1 AND ( CAST(wp_asdfadsf_tec_occurrences.start_date AS DATETIME) > '' AND wp_asdfadsf_postmeta.post_id IS NULL ) AND wp_asdfadsf_posts.post_type = 'tribe_events' AND ((wp_asdfadsf_posts.post_status = 'publish')) AND (wp_asdfadsf_posts.ID NOT IN (1580)) GROUP BY wp_asdfadsf_tec_occurrences.occurrence_id ORDER BY wp_asdfadsf_tec_occurrences.start_date ASC, wp_asdfadsf_posts.post_date ASC LIMIT 0, 1 made by require('wp-blog-header.php'), require_once('wp-includes/template-loader.php'), include('/themes/web_theme/page-templates/page-full-width.php'), the_content, apply_filters('the_content'), WP_Hook->apply_filters, Tribe\Events\Views\V2\Template\Page->filter_hijack_page_content, Tribe\Events\Views\V2\Template_Bootstrap->get_view_html, Tribe\Events\Views\V2\Template_Bootstrap->get_v1_single_event_html, tribe_get_view, include('/themes/web_theme_child/tribe-events/single-event.php'), tribe_the_next_event_link, tribe_get_next_event_link, Tribe__Events__Adjacent_Events->get_next_event_link, Tribe__Events__Adjacent_Events->get_event_link, Tribe__Events__Adjacent_Events->get_closest_event, WP_Query->get_posts, apply_filters_ref_array('posts_pre_query'), WP_Hook->apply_filters, TEC\Events\Custom_Tables\V1\WP_Query\Modifiers\Events_Only_Modifier->filter_posts_pre_query, TEC\Events\Custom_Tables\V1\WP_Query\Custom_Tables_Query->get_posts, WP_Query->get_posts
- You must be logged in to reply to this topic.