This thread is resolved. Here is a description of the problem and solution.
Problem: The client is experiencing persistent 500 errors linked to WPML on their staging site, despite extensive troubleshooting including deactivating less essential plugins, reverting to older WPML versions, and consulting forum topics. The errors persist even after enabling WordPress debugging and updating plugins.
Solution: We recommended the following steps to further diagnose and potentially resolve the issue: 1. Enable WordPress debugging to capture specific error messages. This involves adding specific lines of code to the
wp-config.php
file to log errors without displaying them on the site. 2. Reproduce the error to trigger and log specific error messages, then share these messages for further analysis. 3. Ensure all WPML components are updated to the latest versions after ensuring a complete backup of the site and database. 4. If the issue persists, we advised checking the PHP memory limit and using WPML’s troubleshooting tools.
If these steps do not resolve the issue or if the solution becomes outdated, we recommend opening a new support ticket. We also 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 https://wpml.org/forums/.
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.
Languages: English (English )Spanish (Español )Italian (Italiano )
Timezone: Europe/Madrid (GMT+01:00)
Hi there!
You’re right that it’s tricky to reproduce, especially on a staging site without traffic.
In the meantime, could you also ask your hosting provider to check the server logs to see if there are any PHP memory, timeout or resource-related errors when the issue happens?
I have more than plenty of resources and it doesn't do it on my main site where updates have not been done. And I know it might not be directly caused by wpml but the bug does not happen if I deactivate it. So it's a conflict with wpml, but if you can't help me figure this out, ok
Languages: English (English )Spanish (Español )Italian (Italiano )
Timezone: Europe/Madrid (GMT+01:00)
Hi there!
Thanks for the update. Since the issue only happens on the live site and not on staging, it’s very likely related to the higher traffic or load on the production environment. Even if the hosting resources look fine, a specific query or process may be reaching the limits temporarily and triggering the 500 errors.
No, it's actually the opposite, it only happens on staging site, the url I gave you is staging. the live site has not your updates and Ive done the standard procedure if wpml is off, it doens't do it. we're really going in circles
Hello again,
I'm continuing with this ticket because my colleague Paola is on vacation
Thanks for sharing the log file. We traced the issue to how the COD gateway description is being handled in your site: the translation system of WPML String Translation is trying to register/lookup the string 'cod_gateway_description' under the context admin_texts_woocommerce_gateways. The SQL query is using a value='1.…' which suggests the description value may be malformed or duplicated, and this is triggering the fault.
Please follow these steps:
- Update all outdated plugins that appear outdated in this link: hidden link
- Deactivate all plugins, including the WPML ones
- Activate a default WordPress theme, like Twenty Twenty
- Activate the WPML plugins, WooCommerce and WPML Multilingual & Multicurrency for WooCommerce
- If the issue disappeared, start by activating the theme and the rest of the plugins, one by one, until the issue appears again, and you find the culprit
Can you tell me the results of the steps described above?
One question before I complete reactivating each plugin one by one, it would take me 15 minutes to try to trigger this problem for every plugin I reactivate, any way to trigger this bug faster? It's currently the xmas rush, the worst time for me ?
Unfortunately, we don't have enough information to know what triggers the error or the steps to follow to reproduce it. But according to the log you shared, if you follow the steps described, you should be able to find the culprit of the problem faster.
This will might be resolves only after xmas done, because 15minutes x each plugin is not possible right now, the procedure given is the standard dfebugging, not really faster
To effectively identify the root cause and resolve the issue, we need to be able to reproduce the problem consistently. If the issue cannot be reproduced on demand or the exact steps to trigger it are unclear, the steps we've shared are the most reliable way to collect the necessary information and move forward with troubleshooting. We appreciate your collaboration in helping us gather these details so we can assist you as efficiently as possible.