Skip Navigation

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 11 replies, has 4 voices.

Last updated by Ahmed Mamdouh 1 year ago.

Assisted by: Ahmed Mamdouh.

Author Posts
July 25, 2023 at 5:30 pm #14098515

andrewT-18

We are getting instant 502 redirect errors on the website and they won't stop. This happened after we pushed live about 100 translated pages. We did NOT run into this issue before doing that and no other plugins changed.

We worked with our hosting and they tried moving us to a different shared server, increased memory limits, set-back our PHP version and assured us that we met all minimum requirements for WPML as per your documentation.

The 502 errors are completely random, sometimes happening on home page, other times on sub pages. Initially, we saw it happening when we were on a translated page and then tried to go back to any default language (English) page.

Let us know how we should diagnose this issue. Thank you,

July 26, 2023 at 8:44 am #14101065

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Hi,

Thank you for contacting the support.

Can you enable debugging on your site? See https://wpml.org/documentation/support/debugging-wpml/ for details. Once enabled, browse the WordPress admin pages (random), frontend website and the said sections/pages a few times. This will log the errors in the debug.log file which you can upload somewhere (i.e. hidden link) and share the download link for investigation.

IMPORTANT: Take full backup of your website and database beforehand. It is highly advised to try the following on a staging/dev site first, so your live website isn't compromised.

Also please try with minimal setup like only WPML and Elementor plugins active on the site and see if the issue still happens? If it still happens, retry with a standard WordPress theme (i.e. 2021 or 2023).

Please let me know and I'll try my best to further assist you on the matter.

Regards.

July 26, 2023 at 5:01 pm #14106249

andrewT-18

Hi,

I have moved everything over to staging site and not getting the errors with PHP 8.0. If I'm using our production site as the URL we are putting in WPML backend, would the error still occur on staging site if all else is the same as production site (plugins, set-up etc).

Also, I'm worried because we didn't actually change anything, the issues just stopped. We haven't pushed this site live yet but I'm concerned that when it goes live we will get issues and not know what to do about it. Are there any other support articles to help work through this issue?

Thank you,

July 27, 2023 at 11:47 am #14110345

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the details.

The 502 Bad Gateway error indicates that the server, while acting as a gateway or proxy, received an invalid response from the upstream server.

...502 error is usually not something you can fix, but requires a fix by the web server or the proxies you are trying to get access through.

Ref: hidden link

I am afraid this can't be detected easily and there can be any reason from a broken communication to faulty configurations. At the moment I can recommend checking this article hidden link and see if it helps.

Also check this thread https://wpml.org/forums/topic/since-ive-added-a-new-language-i-getting-502-bad-gateway-messages-when-saving/#post-11643985 and follow steps #4 and #5.

Remember to take full backup of site and database before proceeding!

Please let me know.

July 31, 2023 at 4:50 pm #14128947

andrewT-18

Hi,

We are getting 502 errors again. Could you please send private message request so I can send you our debug log and additional information to look into the issue? It's happening after you pushed a bunch of translated pages live from the plugin.

Thank you,

August 1, 2023 at 6:53 am #14130643

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Sure, I've set your next reply as private.

Please do not copy/paste the contents of the log files in the message. But upload somewhere and share the download link(s).

August 1, 2023 at 12:54 pm #14134415

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Thank you for the access and the details. I'll check soon about the 502 errors and 'll get back to you accordingly.

For the other issue, I recommend opening a separate ticket because as per forum policy we can only handle one issue per ticket. So others looking for a particular solution can find it easily.

August 1, 2023 at 3:00 pm #14135625

andrewT-18

Could you please send us another private message option? We have to switch all this over to a dev environment for testing on your end. I'll give you different info for that. Thanks,

August 2, 2023 at 8:50 am #14140073

Waqas Bin Hasan
WPML Supporter since 05/2014

Languages: English (English )

Timezone: Asia/Karachi (GMT+05:00)

Sure, not a problem.

I've set your next reply as private again.

August 8, 2023 at 5:41 pm #14171711

Alejandro
WPML Supporter since 02/2018

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

Timezone: Europe/Rome (GMT+02:00)

Hello!

I have checked your site (our translation proxy team had access to your dev environment), however i'm also having trouble trying to recreate the problem here.

May i know how you saw the 502 errors? i currently enabled the debug logs in your dev site in case you manage to recreate the problem, however i wonder if the problem could be related to this one:

https://wpml.org/errata/opcache-php-fatal-error-uncaught-typeerror-wpmluserusersbycapsrepository__construct-argument-2-languagepairs-must-be-of-type-wpmluserlanguagepairsilanguagepairs/ even though there's nothing about this on the current debug.log

At the same time you also seem to have a lot of PHP version related issues from WP Engine and so many other plugins (there's one from our plugin as well that is now fixed in version 4.6.5 which was released yesterday).

The issues seem harmless but touch very particular features like object caching (wp engine), "recursive iterators" (all in one migration) and so many other things that could create issues when triggered in a certain way.

apart from that, this is all i managed to find: hidden link

I can see 404 errors on duplicated pages, but not 502 errors anywhere.

--------------

I know this is a staging site, but i need your permission to disable all the plugins on the site and themes to at least verify what's going on with those 404 errors while duplicating plugins. but at the same time i'd appreciate if you could downgrade your PHP version until wp engine fixes the issues that are overcrowding the log (and may obfuscate the logging of the real reason for teh redirects or even for the 404 errors).

Regards.

August 8, 2023 at 6:57 pm #14171999

andrewT-18

Truly NO idea what the 404 issue you are playing with? Not sure why it creates 404 pages but also not what originally caused us any 502 issues.

We got 502 issues when sending pages to a 3rd party translator, having them send the back to us, us clicking "get translations" and then publishing a batch of translated pages. Please get with Ahmed on your team as I sent an email to him with all the information necessary to figure out this issue.

Also not sure the other error you think it was as there was nothing in debug logs about this.

At this point, please do NOT disable any other plugins and hold on this request until we discuss with our other developers and Ahmed. Thank you,

April 29, 2024 at 8:12 pm #15578673

Ahmed Mamdouh
Supporter

Languages: English (English ) Arabic (العربية )

Timezone: Africa/Cairo (GMT+03:00)

Hello,

This issue has been resolved, please let me know if you still need any further help regarding this.

Best regards,
Ahmed Mamdouh.