This thread is resolved. Here is a description of the problem and solution.
Problem:
You are experiencing bad gateway errors on specific pages when the WPML Multilingual CMS plugin is activated, particularly when switching languages from French to English. The issue seems to arise due to a conflict between WPML and Elementor Pro plugins.
Solution:
We recommend the following steps to resolve the issue:
1. Deactivate all non-WPML plugins and switch to a standard WordPress theme to check if the problem persists. Remember to back up your database and website before proceeding.
2. If the error continues, enable the WP debug log, revisit the problematic page, and share the log file with us for further analysis. You can find guidance on enabling the WP debug log here: WordPress Debug Documentation.
3. As a temporary workaround, you can go to WPML > Translations and approve translations in bulk, then adjust the settings in WPML > Settings > Automatic translation to 'Publish right away without reviewing' to avoid reviewing translations that might trigger the error.
If these steps do not resolve the issue or if the solution becomes outdated, we highly recommend checking related known issues at WPML Known Issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If the problem persists, please open a new support ticket.
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: Exception
This topic contains 24 replies, has 3 voices.
Last updated by Long Nguyen 10 months, 2 weeks ago.
Assisted by: Long Nguyen.
Author | Posts |
---|---|
July 15, 2024 at 10:49 pm #15957008 | |
brianB-36 |
Background of the issue: Symptoms: Questions: |
July 16, 2024 at 2:21 am #15957457 | |
Long Nguyen WPML Supporter since 02/2022
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi Brian, Thank you for contacting WPML support, I’m happy to help you with this issue. There could be an error while loading those pages. I suggest you enable a minimal environment as below and see if it helps: If it persists, please enable WP debug log, visit the page again to see the error and share the log file with me. I will take a look at it, and determine where to go from there. Looking forward to your reply. |
July 16, 2024 at 1:00 pm #15960642 | |
brianB-36 |
I turned off all the plugins, it's seems when Elementor Pro is deactivated and all the other plugins are active the bad gateway error does not occur. Also, when WPML is deactivated all the other plugins are active, even Elementor Pro, the bad gateway error does not occur. It seems like there is some conflict between these two plugins. The site needs to have both. The pages that are getting the bad gateway error seem to when switching from French to English. I just discovered that when I open the pages with errors in Elementor, make a simple change like add a space after a paragraph then save it, the error goes away. I did this to all the pages that were getting this error. I then went and tested all the pages and now a page that wasn't getting that error and was saved previously after the automatic translations is now getting the error. The latest page getting the error is hidden link. When I open it in Elementor, make a simple update and save it, then go back and refresh the page the error goes away. But when I switch to French (no error) than back to English the error comes back. My client is supposed to review the site tomorrow so they can approve all the WPML translations that were done then we go live with this new site using WPML. I can't have these errors showing up when they are reviewing. We chose WPML because it was compatible with Elementor, please help me get this issue resolved. Debugging has been turned on. I can send you admin access. The site has been backed up so you can feel free to troubleshoot/test without worries. |
July 17, 2024 at 1:35 am #15963155 | |
Long Nguyen WPML Supporter since 02/2022
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi, I would like to request temporary access (wp-admin and FTP) to your site to take a better look at the issue. It would be better to have a testing site where the issue is replicated. Your next reply is set to private to share the info. ❌ IMPORTANT: Please backup your database and website before proceeding ❌ Looking forward to your reply. |
July 17, 2024 at 2:49 am #15963282 | |
brianB-36 |
Disregard the server protection details I provided in my last reply, those details are not needed. Let me know if you need anything else. |
July 17, 2024 at 3:20 am #15963337 | |
Long Nguyen WPML Supporter since 02/2022
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi, I don't see that issue on my end, even though both Elementor Pro and WPML are activated. Here is the screen record hidden link If the issue still occurs, I suggest you follow the documentation below and apply the workaround to see if it helps. Looking forward to your reply. |
July 17, 2024 at 1:48 pm #15966628 | |
brianB-36 |
I wasn't getting the errors on those pages that I indicated when I first tried this morning. I started going through the entire site clicking on all the links and switching to French and then back to English and now I'm getting the bad gateway error on several pages. Please click through all the pages of the site and switch back and forth from English to French and back to English, I'm sure you'll run into the error that way. hidden link Several others as well. Please help me resolve this. |
July 17, 2024 at 1:58 pm #15966646 | |
brianB-36 |
Regarding your possible fix, this site is hosted at WP Engine and WP Engine doesn't not allow .htaccess files. Also, the video clip you sent wasn't working. I really need to get this issue fixed as soon as possible. Are you available to message back and forth in real time? |
July 18, 2024 at 2:13 am #15969142 | |
Long Nguyen WPML Supporter since 02/2022
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
Hi, I check those pages on my end and still don't see the issue. Here is another screen record hidden link Regarding the workaround in the documentation, it is a PHP code and you can add it directly to the file functions.php in the theme/child theme folder. If you want to have a quick reply, please open a new chat session. When at least one supporter is available, the chat session will be opened. Looking forward to your reply. |
July 18, 2024 at 3:53 am #15969444 | |
brianB-36 |
How do I open a new chat session? Also, what does the PHP code do if I add i to the functions.php file an dhow will that fix this problem? |
July 18, 2024 at 4:35 am #15969553 | |
brianB-36 |
I just added that code to the functions.php file and no change. I'm still getting the errors. What was that code supposed to do? Most of the pages that get the error is when I go from French to English. I really need faster responses so I can get this resolved. I assured my client that WPML would work great for their Multilanguage site based on the my research. Is there a support person that this can get transferred to that more aligned with my working hours. I'm at my desk from 8am to 7pm most days. I can't send this link to my client to review the French translations with these errors. I was supposed to send them the site to review this morning. Please help me get this resolved or please connect me with a support person that can help me during my business hours. |
July 18, 2024 at 4:58 am #15969655 | |
Long Nguyen WPML Supporter since 02/2022
Languages: English (English ) Timezone: Asia/Ho_Chi_Minh (GMT+07:00) |
How do I open a new chat session? When you open a new ticket, our system will try to find a support who is available and open a chat session first. If not, a new forum ticket will be created as this forum ticket. what does the PHP code do? This will tell WPML not to add the language folder to the home_url as usual when the function flush_rewrite_rules() is called on every page request. Can you access those pages with another browser/device? As you can see in my screen record, I don't see that issue on my end. Also, I'm asking my colleague who has the same timezone (US) to take care of this ticket as you requested. Thanks. |
July 18, 2024 at 5:13 am #15969712 | |
brianB-36 |
Thanks for getting back to me. I will try from other devices/browsers, Chrome is my primary browser so I will try Edge and also find another computer to test from. In the meantime it would be great to get one of your colleagues in my timezone or close to it. Please keep me posted. |
July 18, 2024 at 12:12 pm #15972412 | |
Lucas Vidal de Andrade WPML Supporter since 11/2023
Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português ) Timezone: America/Sao_Paulo (GMT-03:00) |
Hey there, Mr. Nguyen reached out to me, so I can continue support in my time zone (GMT-3). I made several tests on your website and wasn't able to reproduce the issue you mentioned. I opened all the pages in your menu, one by one, and changed the language on each of them a couple of times. No issues. The 502 error can have different causes, as it is a generic error. In your case, the error is happening at the server level. As Mr. Nguyen already advised, please test your website in a different environment (preferably on another device, with another browser, connected to another network, like your phone connected to a mobile network). This way we can track if the cause is perhaps a local configuration of your machine. If the error continues to occur in this other environment, please notify me. I'll set up a server where you can copy your website. This way, we can test if the issue is happening due to your server configuration or due to server overloads. We understand this is a time-critical matter. Unfortunately, when errors happen on a server level and are not fully reproducible, it takes a while until we can understand the cause. We greatly appreciate your cooperation. |
July 18, 2024 at 1:50 pm #15972904 | |
brianB-36 |
Hi Lucas, Thanks for going through all the links and testing everything. I'm good to know the error isn't happening on your end. It's definitely happening on my end but it's not consistent, however, it seems to get triggered on the same group of page. Lat night after sending my last message to Mr. Nguyen. I restored the site back to a recently backup I made a couple hours earlier and then tested everything in Chrome and the error did not occur on any of the pages I had issues with previously. This morning I tried testing al the pages in Edge, switching back and forth from English to French and back to English. The error didn't occur at all. I then went back to Chrome and tried the "Types of Shielding" page in English and got the error right away. I tried that page in French and didn't get the error. Then I tried that same page back in Edge and got the error immediately where just 30 minutes ago before Chrome triggered it, it was working in Edge perfectly fine. If this is a server error why would it work in Edge and not in Chrome? It worked in Edge until Chrome triggered it and then is it possible Edge was seeing the network cached page as it wasn't when I didn't get the error get 30 minutes ago. I also tried from my phone (verizon network) after getting the error in Chrome then in Edge. I tried a couple pages that didn't produce the error then tried the "Types of Shielding" page in English and got the error immediately. See screenshot. What network are you on that you're not getting the error. What browser are you using and does the error occur on your phone? This has been very frustrating and my client is becoming impatient. I really appreciate your help in getting this resolved. Thanks for taking this case over so we can communicate back and forth much quicker. Thanks! |