Skip Navigation

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

Problem:
The client is experiencing 500 server errors when accessing the Translation Management settings page in WPML. The issue arises because WPML is searching for a database table with the 'wp_' prefix, whereas the client's site uses a custom table prefix.
Solution:
Follow the steps outlined in the erratum regarding custom database prefixes and multiple languages, which 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/

If this solution does not resolve your issue, or if it seems outdated, we 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. Should you need further assistance, please open a new support ticket 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 5 replies, has 1 voice.

Last updated by Andrey 1 week, 6 days ago.

Assisted by: Andrey.

Author Posts
June 12, 2025 at 12:08 pm #17129981

Sven

Background of the issue:
Trying to re-open my ticket, as it has been closed when I was waiting for FTP and login details from my client.

I am trying to resolve an issue where my customer reported that they are unable to access translations in the backend. This issue occurs when accessing the Translation Management settings page, resulting in multiple 500 errors. Our table prefix is different from the standard 'wp_' prefix, but WPML seems to be looking for a table with the 'wp_' prefix. More details can be found here: https://wpml.org/forums/topic/translation-management-500-server-error-table-db_name-wp_icl_translations-doesnt-exist/. I can now provide FTP and login details for a staging version of the site.

Symptoms:
500 Server error - Table 'db_name.wp_icl_translations' doesn't exist. Console shows multiple 500 errors when accessing the Translation Management settings page.

Questions:
Is there any known issue with WPML regarding custom table prefixes?
Is there a quick fix for the behavior where WPML looks for a table with the 'wp_' prefix?

June 12, 2025 at 12:22 pm #17130039

Sven

This fix unfortunately doesn't help, although it sounds like the exact issue we're having: https://wpml.org/errata/custom-database-prefix-and-having-a-30-languages-can-cause-a-database-error-when-visiting-translation-dashboard/

June 12, 2025 at 12:26 pm #17130084

Andrey
WPML Supporter since 06/2013

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

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

I’m sorry that you ran into trouble with this.

I need to request temporary access (wp-admin and FTP) to your site—preferably to a test site where the problem has been replicated if possible—in order to be of better help. When you log in to leave your next reply, you will find the needed fields below the comment area. The information you will enter is private, meaning only you and I can see and access it.

June 12, 2025 at 1:33 pm #17130324

Andrey
WPML Supporter since 06/2013

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

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

Thank you for the details.

I discovered the reason. Here are some additional steps to take:

1. Besides, the steps outlined in this erratum:
https://wpml.org/errata/custom-database-prefix-and-having-a-30-languages-can-cause-a-database-error-when-visiting-translation-dashboard/

2. You also need to go to /wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wpml/src/Infrastructure/WordPress/Component/Item/Application/Query/SearchQuery/QueryBuilder/ManyLanguagesStrategy and open the file SearchPopulatedTypesQueryBuilder.php

3. Look for:

      LEFT JOIN wp_icl_translations target_t
         ON target_t.trid = source_t.trid
             AND target_t.language_code IN ({$gluedEscapedLanguageCodes})
       LEFT JOIN wp_icl_translation_status target_ts
         ON target_ts.translation_id = target_t.translation_id

4. And change to:

      LEFT JOIN {$this->queryPrepare->prefix()}icl_translations target_t
         ON target_t.trid = source_t.trid
             AND target_t.language_code IN ({$gluedEscapedLanguageCodes})
       LEFT JOIN {$this->queryPrepare->prefix()}icl_translation_status target_ts
         ON target_ts.translation_id = target_t.translation_id
June 12, 2025 at 2:34 pm #17130612

Sven

Thanks, Andrey, that actually did the trick. This case is closed.

So we haven't messed anything up, it's just that ‘too many’ languages trigger different code from your plugin, and there were calls for database tables with hard-coded table prefixes in your code? I assume you're fixing this for the next release?

June 12, 2025 at 3:36 pm #17130783

Andrey
WPML Supporter since 06/2013

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

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

Yes, you are right. I have already reported this to our development team, and they will definitely fix it. Thank you for bringing this to our attention. Have a nice weekend ahead.