not unique table/alias: ‘wp-tec_occurrences’
-
This topic has appeared before, but there is no clear resolution in the prior ticket. I am flooded with error log entries for WordPress database error Not unique table/alias: ‘wp_tec_occurrences’. I have migrated to V6 and my configuration shows that the migration was completed successfully. This is NOT an issue of wp_tec_occurrences being absent. This is a badly formed query that JOINs wp_tec_occurrences *twice* but does not use aliases, so the system cannot determine which join it should be referring to when wp_tec_occurrences is referenced. Is there a solution in place for this recurring issue that others have also experienced?
Thanks (error appears below)
WordPress database error Not unique table/alias: ‘wp_tec_occurrences’ for query
SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts
LEFT JOIN wp_term_relationships ON (wp_posts.ID = wp_term_relationships.object_id)
INNER JOIN wp_tec_occurrences ON wp_posts.ID = wp_tec_occurrences.post_id
LEFT JOIN
wp_pmpro_memberships_pages
ASpmpro_mp_6
ONpmpro_mp_6
.page_id
=wp_posts
.ID
JOIN wp_tec_occurrences ON wp_posts.ID = wp_tec_occurrences.post_id
WHERE 1=1 AND wp_posts.ID NOT IN (149,489,4361,4870,11,36,40,42,46,50,52,54,56,58,134,243,1435,1930,3006,3045,3122,3114,3259,3846,4691,4660,4754,4926,4934,5504,6116,6820,149,489,4361,4870,11,36,40,42,46,50,52,54,56,58,134,243,1435,1930,3006,3045,3122,3114,3259,3846,4691,4660,4754,4926,4934,5504,6116,6820) AND (
wp_term_relationships.term_taxonomy_id IN (67)
) AND (
CAST(wp_tec_occurrences.end_date AS DATETIME) < ‘2024-09-27 00:00:00’ ) AND wp_posts.post_type = ‘tribe_events’ AND ((wp_posts.post_status = ‘publish’)) AND (pmpro_mp_6.membership_id IS NULL)GROUP BY wp_tec_occurrences.occurrence_id
ORDER BY wp_posts.post_date ASC LIMIT 0, 1
made by require(‘wp-blog-header.php’), require_once(‘wp-includes/template-loader.php’), include(‘/themes/organic-natural/template-full.php’), get_header, locate_template, load_template, require_once(‘/themes/organic-natural/header.php’), wp_head, do_action(‘wp_head’), WP_Hook->do_action, WP_Hook->apply_filters, _wp_render_title_tag, wp_get_document_title, apply_filters(‘document_title_parts’), WP_Hook->apply_filters, Tribe\Events\Views\V2\Hooks->filter_document_title_parts, Tribe\Events\Views\V2\Template\Title->filter_document_title_parts, Tribe\Events\Views\V2\Template\Title->build_title, Tribe\Events\Views\V2\Template\Title->get_posts, Tribe\Events\Views\V2\View->get_html, Tribe\Events\Views\V2\Views\List_View->setup_template_vars, Tribe\Events\Views\V2\View->setup_template_vars, Tribe\Events\Views\V2\Views\List_View->prev_url, Tribe\Events\Views\V2\Views\List_View->get_past_url, Tribe__Repository->count, 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
The page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.