Skip Navigation

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.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 9:00 – 12:00 -
- 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 13:00 – 18:00 -

Supporter timezone: Asia/Singapore (GMT+08:00)

This topic contains 0 replies, has 0 voices.

Last updated by Kor 2 months, 1 week ago.

Assisted by: Kor.

Author Posts
December 9, 2024 at 3:20 pm #16493925

paulW-38

Background of the issue:
I was trying to check the server logs and noticed SQL errors after updating WPML String Translation to version 3.2.16. The issue can be seen on the page: hidden link. The error involves a missing column 'wpml_translations.language_code' in the SQL query.

Symptoms:
I am seeing hundreds of errors in the server logs: 'WordPress database error Unknown column 'wpml_translations.language_code' in 'where clause' for query SELECT SQL_CALC_FOUND_ROWS wp_posts.ID FROM wp_posts WHERE 1=1 AND (0 = 1) AND ((wp_posts.post_type = 'product' AND (wp_posts.post_status = 'publish' OR wp_posts.post_status = 'paused' OR wp_posts.post_status = 'active' OR wp_posts.post_status = 'queued' OR wp_posts.post_status = 'finished' OR wp_posts.post_status = 'autoresponder' OR wp_posts.post_status = 'workflow'))) AND ( ( ( wpml_translations.language_code = 'de' OR (wpml_translations.language_code = 'de' AND wp_posts.post_type IN ( 'document_template' ) AND ( ( ( SELECT COUNT(element_id) FROM wp_icl_translations WHERE trid = wpml_translations.trid AND language_code = 'de') = 0) OR ( ( SELECT COUNT(element_id) FROM wp_icl_translations t2 JOIN wp_posts p ON p.id = t2.element_id WHERE t2.trid = wpml_translations.trid AND t2.language_code = 'de'" while reading response header from upstream.

Questions:
Why am I seeing SQL errors related to 'wpml_translations.language_code' after updating WPML String Translation?
How can I resolve the missing column error in the SQL query?

December 9, 2024 at 3:37 pm #16494024

Kor
Supporter

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Let me know how it goes.

The topic ‘[Closed] SQL errors after WPML String Translation to 3.2.16’ is closed to new replies.