Background of the issue:
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.
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?
Languages: English (English )German (Deutsch )French (Français )
Timezone: Europe/Zagreb (GMT+02:00)
Hi,
Could you please check your database and confirm whether the wp_icl_translations table actually exists, or if it might be missing? This will help us determine if the issue is with the table prefix or a missing table.
yes and no: Yes, the table exists, but not with the wp_ prefix, but our own one. That's just how it should be, judging from other sites I have worked on. The prefix seems to be the problem, as WPML seems to believe it should be wp_. The actual site is working fine with WPML, as it stands, so it's not a general problem with table prefixes for WPML on my customer's site.
Welcome to WPML support. Can you please follow the steps below?
- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Add the code below to functions.php file of your theme:
- Check the frontend of the website once
- Remove the code from functions.php
See if the table issue is fixed?
If not, I'd appreciate it if you could check that the 500 error happens on a minimal installation or not:
- IMPORTANT STEP! Create a backup of your website. Or better approach will be to test this on a copy/staging version of the website to avoid any disruption of a live website.
- Switch to the default theme such as "TwentyTwenty" by going to "WordPress Dashboard > Appearance > themes".
- Go to "WordPress Dashboard > Plugins" and deactivate all plugins except WPML and its add-ons.
- Check if you can still recreate the issue.
- If not, re-activate your plugins one by one and check the issue each time to find out the plugin that causes the problem.
sorry for not getting back earlier, and thanks for the hint for the functions.php code to fix missing tables.
Of course, I had already tried this out, to no avail. Tables indeed ARE there, WPML just seems to mistakingly believe the prefix should be wp_ instead of our custom prefix.
I had mentioned it in my initial report, but it seems your formatting AI has removed it from the post: I've already switched to Twenty Twenty-Three, and I disabled ALL plugins but the WPML ones, without any change, the errors persist.
Translations are working fine (i.e. language versions in the front-end, connected posts/pages etc.), it's just that I can't access Translation Management in the backend due to the error.
Thanks, Well what I have in mind is maybe there is something dded to wp-config.php that causes such a mis identification of the database prefix? As I have never heard of such an issue.
Would you please copy your website to a staging version and provide the login and FTP info by setting the next reply to private?
I will try to take a look there without the fear of breaking a live website.
Thanks.
The topic ‘[Closed] Translation Management: 500 Server error – Table ‘db_name.wp_icl_translations’ doesn’t exist’ is closed to new replies.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.