This is the technical support forum for WPML - the multilingual WordPress plugin.

Everyone can read, but only WPML clients can post here. WPML team is replying on the forum 6 days per week, 22 hours per day.

This thread is resolved. Here is a description of the problem and solution.

Problem: This error appears only in the debug log: WordPress databasefout Not unique table/alias: 't'

Solution: A customer reported that updating the PHP version, the problem was solved.

Make sure you are using a version still maintained by PHP with your host.

This topic contains 4 replies, has 2 voices.

Last updated by Muriel 3 years ago.

Assigned support staff: Bruno.

Author Posts
August 24, 2016 at 7:26 am #1018513

Muriel

The error appears only in the debug log.

WordPress databasefout Not unique table/alias: 't' bij query SELECT  wp2015_comments.* FROM wp2015_comments JOIN wp2015_posts ON (wp2015_comments.comment_post_ID = wp2015_posts.ID)  INNER JOIN wp2015_term_relationships ON (wp2015_posts.ID = wp2015_term_relationships.object_id) INNER JOIN wp2015_postmeta ON ( wp2015_posts.ID = wp2015_postmeta.post_id ) JOIN wp2015_icl_translations t
							ON wp2015_posts.ID = t.element_id
								AND t.element_type = CONCAT('post_', wp2015_posts.post_type)   JOIN wp2015_icl_translations t
                                    ON wp2015_comments.comment_post_ID = t.element_id
                                        AND t.element_type = 'post_product' AND t.language_code = 'nl'  WHERE comment_approved = '1'  AND ( 
  wp2015_term_relationships.term_taxonomy_id IN (457,458,462,463,467,468,469)
) AND ( 
  ( wp2015_postmeta.meta_key = '_visibility' AND CAST(wp2015_postmeta.meta_value AS CHAR) IN ('visible','catalog') )
) AND wp2015_posts.post_type = 'product' AND (wp2015_posts.post_status = 'publish') AND ( ( t.language_code = 'nl' AND wp2015_posts.post_type  IN ('post','page','attachment','product','product_variation','extra_product_tab','portfolio' )  ) OR wp2015_posts.post_type  NOT  IN ('post','page','attachment','product','product_variation','extra_product_tab','portfolio' )  ) AND  wp2015_posts.post_type NOT IN ('shop_order','shop_order_refund')  AND  wp2015_posts.post_type <> 'shop_webhook'  GROUP BY wp2015_comments.comment_id ORDER BY comment_date_gmt DESC LIMIT 10 gemaakt door require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts
[23-Aug-2016 17:48:34 UTC] WordPress databasefout Not unique table/alias: 't' bij query SELECT  wp2015_comments.* FROM wp2015_comments JOIN wp2015_posts ON (wp2015_comments.comment_post_ID = wp2015_posts.ID)  INNER JOIN wp2015_term_relationships ON (wp2015_posts.ID = wp2015_term_relationships.object_id) INNER JOIN wp2015_postmeta ON ( wp2015_posts.ID = wp2015_postmeta.post_id ) JOIN wp2015_icl_translations t
							ON wp2015_posts.ID = t.element_id
								AND t.element_type = CONCAT('post_', wp2015_posts.post_type)   JOIN wp2015_icl_translations t
                                    ON wp2015_comments.comment_post_ID = t.element_id
                                        AND t.element_type = 'post_product' AND t.language_code = 'nl'  WHERE comment_approved = '1'  AND ( 
  wp2015_term_relationships.term_taxonomy_id IN (474,475,476,477,478)
) AND ( 
  ( wp2015_postmeta.meta_key = '_visibility' AND CAST(wp2015_postmeta.meta_value AS CHAR) IN ('visible','catalog') )
) AND wp2015_posts.post_type = 'product' AND (wp2015_posts.post_status = 'publish') AND ( ( t.language_code = 'nl' AND wp2015_posts.post_type  IN ('post','page','attachment','product','product_variation','extra_product_tab','portfolio' )  ) OR wp2015_posts.post_type  NOT  IN ('post','page','attachment','product','product_variation','extra_product_tab','portfolio' )  ) AND  wp2015_posts.post_type NOT IN ('shop_order','shop_order_refund')  AND  wp2015_posts.post_type <> 'shop_webhook'  GROUP BY wp2015_comments.comment_id ORDER BY comment_date_gmt DESC LIMIT 10 gemaakt door require('wp-blog-header.php'), wp, WP->main, WP->query_posts, WP_Query->query, WP_Query->get_posts

URL of (my) website where problem appears: hidden link
I know the php version should be upgraded but the hosting provider does not want to do this for this year. So therefor i did not update the plug-ins or WordPress itself, because I do not want to jeopardize the live site any further.

August 24, 2016 at 5:43 pm #1020181

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Thank you for contacting us.

This seems to be a problem with the database or compatibility. Please as a test, could you disable all non-WPML plugins, switch to the default theme and see if the problem persists?

Thank you.

August 29, 2016 at 6:41 am #1026615

Muriel

As this website is in production.
I am going to create a copy on a testserver and check if the problem persists.

August 29, 2016 at 3:59 pm #1028466

Bruno
Supporter

Languages: English (English ) Portuguese (Brazil) (Português )

Timezone: America/Sao_Paulo (GMT-03:00)

Ok. Please let me know when you're ready.

Thank you.

September 2, 2016 at 7:23 am #1055013

Muriel

The issue does not exist on the testserver.
The problem lies with the not updated php version, which causes various issues.