Skip to content Skip to sidebar

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

Problem:
You are trying to create a translation job by assigning content to a translator, but the job does not appear in the translation queue of the assigned translator, despite having up-to-date plugins and themes, and correct translation languages set for the translator.
Solution:
We discovered that the issue was due to the MySQL database having the SQL mode ANSI_QUOTES enabled, which caused WPML queries to misinterpret string literals. To resolve this, you can add the following code to your

functions.php

file:

$wpdb->set_sql_mode(['ONLY_FULL_GROUP_BY', 'ERROR_FOR_DIVISION_BY_ZERO', 'NO_ENGINE_SUBSTITUTION']);

This workaround adjusts the SQL mode settings to prevent the misinterpretation.

**** Important! Please make a full site backup (files and DB) before you proceed with those steps****

If this solution does not apply to your case, or if it seems outdated, we recommend opening a new support ticket. Additionally, we highly recommend checking related known issues at https://wpml.org/known-issues/, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. For further assistance, please visit our support forum at WPML Support Forum.

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.

Tagged: 

This topic contains 10 replies, has 1 voice.

Last updated by Itamar 2 months, 1 week ago.

Assisted by: Itamar.

Author Posts
May 7, 2025 at 9:15 am #17005247

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi, and thanks for trying my suggestions.

The question that arises now is what the collation is for the default WordPress tables in your site's database.
Is it also utf8mb4_unicode_520_ci?
For example, please check the wp_posts and wp_options tables.

If you answer yes, please let me take a copy of your site. For this, I must install a plugin like Duplicator or All In One Migration. Please let me know if you agree.

Regards,
Itamar.

May 8, 2025 at 8:59 am #17010371

benjaminA-35

Hi,

the collation of the wordpress tables is also utf8mb4_unicode_520_ci.

We manage our plugins manually so I needed to install that myself. Most plugins I can find - including Duplicator - don't support backup of a multisite without a paid upgrade.

I have created a full site backup with Duplicator Lite anyways while excluding some plugins in order to keep the size under the required limit. I have placed the files in /var/www/icf-church/_duplicator_backup so you should be able to download the files via ftp. Hope that you can use that.

Regards

May 8, 2025 at 6:34 pm #17013427

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Thanks. I'm downloading the package of your site.
I hope it will work the way you prepared it.
I'll send it to our second-tier supporters and keep you updated.

I appreciate your patience.
Itamar.

May 11, 2025 at 6:44 pm #17020598

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

I got errors while trying to install your site on my local server. I forwarded the package to our second-tier supporters. Hopefully, they will have the means to install it. Otherwise, we will need a working package from you. (We have the Duplicator and All In One Migration pro versions.)

I'll keep you updated here.

Regards,
Itamar.

May 13, 2025 at 10:12 am #17026463

benjaminA-35

Hi,

We've identified the root cause of the issue. Our MySQL database had the SQL mode ANSI_QUOTES enabled.

As a result, WPML queries including WHERE clauses like:

translation_status.translation_service = "local"

were interpreted incorrectly - "local" was treated as a column name rather than a string. This happens because, in ANSI_QUOTES mode, string literals must be enclosed in single quotes.

A workaround (not ideal) is to add the following statement to functions.php, especially if updating the database configuration isn’t currently possible:

$wpdb->set_sql_mode(['ONLY_FULL_GROUP_BY', 'ERROR_FOR_DIVISION_BY_ZERO', 'NO_ENGINE_SUBSTITUTION']);

This has resolved the issue on our end.
Thank you for your support.

Best regards

May 13, 2025 at 6:52 pm #17029551

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Wow, that is an interesting discovery.
Thanks for sharing it with us.
I've passed on this information to our second-tier supporters, and if needed, they will discuss this with our developers.

I'm closing this ticket.

Best regards,
Itamar.

May 14, 2025 at 1:11 pm #17032451

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

Our second-tier supporter escalated this issue to our developers and provided proof of concept on how it could be fixed. Please let me know if you want to try it.

Regards,
Itamar.