Skip to content Skip to sidebar

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

Problem:
You are encountering an issue where the Translation Management dashboard in WPML fails to load after adding a 30th language. This results in a WordPress database error indicating that a specific table does not exist. The problem only occurs when a 30th language is added; it functions correctly with up to 29 languages.
Solution:
We have identified that this is a known issue related to using a custom database prefix with more than 30 languages. Our development team is working on a permanent fix that will be included in future versions of WPML. Meanwhile, we recommend following the workaround provided in our errata page. You can find detailed steps to resolve this issue by visiting https://wpml.org/errata/custom-database-prefix-and-having-a-30-languages-can-cause-a-database-error-when-visiting-translation-dashboard/.

Please note that this solution might be irrelevant if it's outdated or not applicable to your specific case. 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. If the issue persists, please open a new support ticket at our 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 7 replies, has 0 voices.

Last updated by Andrey 1 month, 3 weeks ago.

Assisted by: Andrey.

Author Posts
May 28, 2025 at 12:52 pm #17083436

twanW

Background of the issue:
I am trying to open WPML → Translation Management on my staging site (staging.internationaltravelpermits.com) to view and send content for translation after adding more than 30 languages. The issue can be seen at hidden link.

Symptoms:
The Translation Management dashboard fails to load once I enable a 30th language, resulting in a WordPress database error: Table 'wp_itp_dev.gkg3R9t_icl_translations' doesn't exist for query SELECT gkg3R9t_posts.* … JOIN gkg3R9t_icl_translations …. This issue only occurs when I add a 30th language; it works fine up to 29 languages.

Questions:
Why does the Translation Management dashboard fail to load after adding a 30th language?
How can I resolve the SQL error related to the table prefix when adding more than 30 languages?

May 28, 2025 at 2:25 pm #17084036

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for contacting WPML support.

I tested this issue locally but was unable to replicate the behavior. To help isolate the cause, I recommend testing with only the core WPML plugins activated and switching to a default WordPress theme (such as Twenty Twenty-One).

Additionally, I noticed that the REST API is disabled on your local installation. WPML relies on the WordPress REST API for several key functionalities, including communication with translation services and the Advanced Translation Editor.

Please refer to our documentation for more information:
https://wpml.org/documentation/support/rest-api-dependencies/

I would also double-check if the database tables mentioned in the error exist in your database.

May 28, 2025 at 4:12 pm #17084538

twanW

Hi Andrey,

Thanks for taking a look and for the suggestions. I’ve just gone through each of your steps:

Switched to a default theme
I deactivated my theme and activated Twenty Twenty-One, with only the core WPML plugins enabled. The issue still persists.

Deactivated all non-WPML plugins
I left WPML and WPML String Translation active, and deactivated everything else (including caching, SEO, and custom code snippets). No change in behavior.

Checked the REST API
Just to clarify, my staging site has the REST API fully enabled. I can see all of the WPML-specific endpoints. I’ve confirmed that nothing in my .htaccess or server configuration is blocking it, and I’m running the latest WordPress (6.8.1).

Database tables
I inspected the database and I do see the icl_translations, icl_string_translations and related tables, so those appear to exist.

At this point I’m out of ideas—do you have any further troubleshooting steps?

May 28, 2025 at 6:29 pm #17085167

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thank you for your feedback.

Would it be possible to bring your site online so I can investigate the issue further? Alternatively, you can send me a Duplicator package (created using the Duplicator plugin), and I will set it up locally for testing.

I’ve activated a private reply field below where you can securely share the necessary details.

May 29, 2025 at 2:36 pm #17088687

twanW

Hey Andrew,

I dug into the REST endpoint code and pinpointed the culprit in
vendor/wpml/wpml/src/Infrastructure/WordPress/Component/Item/Application/Query/SearchQuery/QueryBuilder/ManyLanguagesStrategy/SearchPopulatedTypesQueryBuilder.php.

The problem is that, after dynamically using $wpdb->prefix for the posts and source_t joins, the code then hard-codes:

LEFT JOIN wp_icl_translations target_t
LEFT JOIN wp_icl_translation_status target_ts

Because our database prefix is gkg3R9t_, those wp_… table names don’t exist. We need to replace those two lines with:

global $wpdb;
$prefix = $wpdb->prefix;

LEFT JOIN {$prefix}icl_translations target_t
LEFT JOIN {$prefix}icl_translation_status target_ts

That change aligns all the joins to use our real prefix and will eliminate the “table doesn’t exist” errors in Translation Management.

EDIT: We have around 14.000 pages, maybe that has something to do with it? Didn't verify that.

Thanks!

May 30, 2025 at 12:15 pm #17092177

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

Thanks to the details you provided, I was finally able to replicate the issue related to the custom database table prefix. I’ve reported it to our development team for further investigation.

Wishing you a great weekend ahead!

May 30, 2025 at 8:36 pm #17093434

twanW

Thanks a lot for your help and for escalating the issue to the development team. I really appreciate the support. Have a great weekend as well!

June 2, 2025 at 2:02 pm #17098276

Andrey
WPML Supporter since 06/2013

Languages: English (English ) Russian (Русский )

Timezone: Europe/Kyiv (GMT+03:00)

The development team confirmed that the fix will be included in future versions of WPML. In the meantime, the workaround can be found here: https://wpml.org/errata/custom-database-prefix-and-having-a-30-languages-can-cause-a-database-error-when-visiting-translation-dashboard/