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: America/Sao_Paulo (GMT-03:00)

Tagged: 

This topic contains 1 reply, has 2 voices.

Last updated by Mateus Getulio 1 year, 5 months ago.

Assisted by: Mateus Getulio.

Author Posts
July 24, 2023 at 2:02 pm #14090113

David

I have found a bug in WPML, and I can tell you how to replicate it.

[Unknown column 'wpml_translations.language_code' in 'where clause']
SELECT wp_posts.* FROM wp_posts WHERE 1=1 AND wp_posts.post_name = 'ateliers-saq' AND wp_posts.post_type = 'attachment' AND ( ( ( wpml_translations.language_code = 'en' OR 0 ) AND wp_posts.post_type IN ('page','attachment','wp_block','wp_template','wp_template_part','wp_navigation' ) ) OR wp_posts.post_type NOT IN ('page','attachment','wp_block','wp_template','wp_template_part','wp_navigation' ) ) ORDER BY wp_posts.post_date DESC

To replicate the bug, I used the function url_to_postid( 'page-that-doesnt-exists' )
The post_type "posts" has to ben not translatable in wmpl settings.

July 25, 2023 at 1:42 pm #14097071

Mateus Getulio
Supporter

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

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

Hello again,

As we discussed on the chat, this issue has been reported already and it is currently being worked on.

I will set the current ticket status to "Escalated to WPML developers team" and I will get back to you as soon as I get any feedback from them.

Thanks for your patience in the meantime.

Kind regards,
Mateus.

The topic ‘[Closed] Unknown column 'wpml_translations.language_code' in 'where clause'’ is closed to new replies.