currentpatterns
Forum Replies Created
Viewing 2 replies - 1 through 2 (of 2 total)
-
Forum: Plugins
In reply to: [The Events Calendar] not unique table/alias: ‘wp-tec_occurrences’I have been doing some troubleshooting on this and I think I have isolated the error. I have submitted a pull request on TEC’s GitHub page and hopefully they will be able to evaluate my proposed solution in the near future.
There are three separate instances where a JOIN clause is being created for table wp_tec_occurrences (which seems extreme):
- The first instance is created via class WP_Query, function get_sql(); $clauses = $this->meta_query->get_sql( ‘post’, $wpdb->posts, ‘ID’, $this ). The meta_query get_sql () calls get_sql_clauses(), which calls get_sql_for_clauses(). The latter function is overridden by TEC class Custom_Table_Meta_Query extension, using get_sql_for_clauses() to create an INNER JOIN on wp_tec_occurrences. There is a check for duplicate clauses here (array $joined_tables), but only within the class. WP_Query later passes this INNER JOIN clause on via argument $join to the two callback functions described below.
- The second instance is the result of WP_Query invoking a callback function for filter hook ‘posts_join’ using apply_filters_ref_array(). TEC class Custom_Tables_Query, an extension of WP_Query, creates the callback function join_occurrences_table(). This function reviews the $join parameter passed from WP_Query to make sure it does not add a duplicate join clause. If no duplicate is found, it adds the new clause to $join.
- A third instance is invoked via the same filter hook described in Instance 2 (‘posts_join’). In this case, TEC class Tribe__Repository__Query_Filters, function join (), creates a callback for function filter_posts_join() using hook ‘posts_join’. TEC extension class Custom_Tables_Query_Filters overrides this function, using filters_post_join() to create another JOIN on wp_tec_occurrences. There is a check for duplicate clauses here (function deduplicate_joins()), but it only runs under certain conditions. The duplicate test is excluded when there are no existing redirects, even though this condition results in the creation of a new JOIN on wp_tec_occurrences. Regardless of the redirects count, deduplicate_joins() should be called prior to return if CTQF variable $query_vars[‘join’] is not empty.
Forum: Plugins
In reply to: [Jetpack - WP Security, Backup, Speed, & Growth] Missing Jetpack widgetsThanks for the response. I did find the Legacy widget, though it did not offer me anything different than what I could already see. I did not realize that the green signified Jetpack – I thought Jetpack in parentheses was the indicator. I guess from your response that “Social Icons” is also no longer available.
FYI, the documentation for “Extra Sidebar Widgets” is out of date.
Viewing 2 replies - 1 through 2 (of 2 total)