Skip to content Skip to sidebar

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.

This topic contains 35 replies, has 2 voices.

Last updated by Otto 4 days, 17 hours ago.

Assisted by: Otto.

Author Posts
August 21, 2025 at 7:02 pm #17338806

operationM

Hi Otto,

I've shared a folder with the debug file in now. Saved in .php to keep the formatting as .txt was quite difficult to read.

Edit: I add you back to the site as well (since rollback, same details as I attached above).
Attached .log version too.

Kind regards

August 21, 2025 at 8:01 pm #17338895

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

Thanks. I made a copy of your site and deployed locally, and it worked fine. So the issue may be related to the environment.

### What the logs indicate
- WPML’s Translation Management is querying mixed table prefixes: the site’s tables use `wp_a3mkw6_…`, but some queries try `wp_icl_translations` (with `wp_`), which doesn’t exist in this database. This mismatch prevents the TM screen from loading.
- The “Duplicate entry … trid_lang” lines are secondary noise from media translation rows already present; not the root cause.

### Likely cause
- An environment/prefix misconfiguration (often after a migration or with caching) where part of the stack resolves the table name using `wp_` instead of the actual prefix.

Can you please check with the hosting if they have any clue about what may be causing the prefix mismatch?

Here are a few pointers:
- Prefix configuration
- Confirm `$table_prefix` in `wp-config.php` is exactly `wp_a3mkw6_`.
- Database state
- Ensure `icl_*` tables exist with the `wp_a3mkw6_` prefix (e.g., `wp_a3mkw6_icl_translations`) and that nothing is querying `wp_icl_*`.
- Server-side code
- Check `wp-content/mu-plugins/` and drop-ins (e.g., `object-cache.php`, Redis plugin) for any hardcoded `wp_` table names or code altering `$wpdb->prefix`/`$wpdb->base_prefix`.
- Caching
- Flush the object cache (Redis) and CDN after corrections
- Temporarily disable object cache to validate; avoid caching `/wp-admin/` and WPML TM REST endpoints.

Best Regards,
Otto

August 22, 2025 at 11:18 am #17340374

operationM

Hi Ottto,

So I've spoken to the hosting company providing them with the debug log file and a screenshot of what's breaking plus the information regarding the prefix suggestion. They have assured me there is nothing in their setup altering or interfering with this. Their suggestion is to install the plugin again however I've done this 3 times now and with accuracy is does this every time after installing a certain amount of custom languages.

From the checklist I've tried everything.

I have disabled the two plugins which were Nginx Helper & Redis Object Cache that came from the hosting provider as part of their setup.
wp-config.php is 100% using the correct prefix. wp_icl_translations

I've switched to 2025 theme and turned off every single plugin except WPML String Translation & WPML Multilingual CMS and still it's not loading. I've re-enabled some essential plugins back on now as JetEngine posts are being translated.

I installed search and replace plugin to see if there was any tables not wp_a3mkw6_ and do a search and replace but all tables have the correct prefix.

What is strange in addition to you saying when you work on it locally it works fine is that I added quite a few custom languages prior with no issues. I setup the default language to be a custom then added a good 5 or 6 custom languages prior to this issue happening again with 0 issues in the debug.log file.

I don't understand if I could do that for those custom languages without issue why when repeating the same process WPML starts looking for a DB table with a different prefix or it's altered?

If you have any other theories you can make changes on the dev test site should you wish to alter anything - don't be afraid of breaking anything as I have taken a snapshot right up until the point of adding about 3 custom languages.

I have installed a file manager plugin too in case you wanted to confirm or alter anything there.

Kind regards and thank you for all your help so far.

August 22, 2025 at 12:46 pm #17340515

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

I checked the problem with our second tier support and there is an issue in our code.

The definitive solution will be included in WPML 4.8. Meanwhile, you can implement this workaround:
https://wpml.org/errata/custom-database-prefix-and-having-a-30-languages-can-cause-a-database-error-when-visiting-translation-dashboard/

Why it was working for me locally: my local env uses the custom wp_ prefix for the tables.

Thank you for all the help, patience and cooperation to debug the problem.

Please give it a try to the workaround and let me know how it went.

Best Regards,
Otto

August 23, 2025 at 11:41 am #17341956

operationM

Hi Otto,

That worked instantly after I altered the two files listed on that link.

Kind regards

August 25, 2025 at 12:37 pm #17345236

Otto
WPML Supporter since 09/2015

Languages: English (English ) Spanish (Español )

Timezone: America/Argentina/Buenos_Aires (GMT-03:00)

Hello,

I am happy to hear that.

A fix is included in WPML 4.8, so you can update the plugin when the next release is available.

As you mentioned that the issue is solved, I am closing the ticket. If you have any other question or issue, don't hesitate to open a new one.

Best Regards,
Otto