Table prefix in table_join_manager file
-
Hello
In the types/vendor/toolset/toolset-common/inc/autoloaded/wp_query_adjustments/table_join_manager.php file database table prefix is set to by default(wp_). If there is a change in database table prefix then this is creating issues. Please check and update it.
return $this->wpdb->prepare( "JOIN {$this->table_name->association_table()} AS {$associations_table_alias} ON ( wp_posts.ID = {$associations_table_alias}.{$role_to_return_id_column} AND {$associations_table_alias}.relationship_id = %d AND {$associations_table_alias}.{$role_to_query_by_id_column} = %d ) ", $relationship_id, $element_to_query_by );
$clause = $this->wpdb->prepare( " # join the icl_translations table independently from WPML's 't' # because that one may not be joined at all time, but we # need it always - this is safer than trying to reuse the 't' one LEFT JOIN {$this->wpml_service->icl_translations_table_name()} AS {$alias_translation} ON ( wp_posts.ID = {$alias_translation}.element_id AND {$alias_translation}.element_type = CONCAT('post_', wp_posts.post_type) ) LEFT JOIN {$this->wpml_service->icl_translations_table_name()} AS {$alias_default_lang} ON ( {$alias_translation}.trid = {$alias_default_lang}.trid AND {$alias_default_lang}.language_code = %s ) JOIN {$this->table_name->association_table()} AS {$associations_table_alias} ON ( ( # join the association row if either the post ID matches the # proper column in the associations table or if the ID of the default # language version of the post matches it wp_posts.ID = {$associations_table_alias}.{$role_to_return_column} OR {$alias_default_lang}.element_id = {$associations_table_alias}.{$role_to_return_column} ) AND {$associations_table_alias}.relationship_id = %d AND {$associations_table_alias}.{$role_to_query_by_column} = %d )", $this->wpml_service->get_default_language(), $relationship_id, $element_to_query_by );
There are other occurences of it as well.
Thanks in advance
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Table prefix in table_join_manager file’ is closed to new replies.