Skip Navigation

This thread is resolved. Here is a description of the problem and solution.

Problem:
The client's site is in Italian, and they encountered a 502 - Bad Gateway error when trying to view the translated English version of the homepage and FAQ page. The error only occurred when logged into the site backend. Additionally, the client mentioned that the graphics in other languages appeared broken.
Solution:
We are pleased to hear that the 502 error is no longer occurring. Regarding the broken layout, we have identified that some shortcodes were either untranslated or not correctly translated. For example, on the "Il sogno" page, the hero slider should not have been translated into English. Also, in the "Gli alloggi disponibili" section, the shortcode did not have any text assigned to it in the translation. We recommend manually searching for shortcodes and links, as they might not always be visible in the Translation Editor. For a detailed explanation, please refer to the following documentation:

If this solution does not seem relevant to your issue, please open a new support ticket with us.

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 14 replies, has 3 voices.

Last updated by federicoA-21 1 year, 5 months ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
December 16, 2023 at 10:22 pm #15078181

federicoA-21

Hi! My site is in Italian, and i tried to translate the homepage and the faq page in English.

I have translated them but now i get an error 502 - bad gateway if i try to see them in English, in original language the works fine.

My hosting provider told me that is a problem cause by Wmpl. Any idea on how to fix it?

December 18, 2023 at 8:20 am #15081051

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

Timezone: Asia/Dhaka (GMT+06:00)

Hi There,
Thanks for contacting WPML Support.

Before this thread gets assigned to my colleague, I'd like to offer some initial guidance or potential solutions.

Since the 500 errors are server-related, I recommend contacting your Hosting/Server Administrator to request the error logs. It would be more effective if you could replicate the issue first and then ask your Server Administrator for the server error log shortly afterward. This log file will provide detailed insights into the specific nature of the issue.

Once you get the log, please share that in the next response. We will check and guide you accordingly.

Looking forward to your response.

Best regards,
Prosenjit

December 18, 2023 at 8:50 am #15081179

federicoA-21

the error log is empty

December 18, 2023 at 8:49 pm #15087495

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)

Hello,

My name is Lucas and I'll be taking on your ticket for support.

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 a testing site where the issue is replicated.

You will find the needed fields for this below the comment area when you log in to leave your next reply. The information you will enter is private which means only you and I can see and have access to it.

Maybe I'll need to replicate your site locally. For this, I’ll need to temporarily install a plugin called “Duplicator” or "All in One WP Migration" on your site. This will allow me to create a copy of your site and your content. Once the problem is resolved I will delete the local site. Let me know if this is ok with you.

IMPORTANT

- Please make a backup of site files and database before providing us access.
- If you do not see the wp-admin/FTP fields this means your post & website login details will be made PUBLIC. DO NOT post your website details unless you see the required wp-admin/FTP fields. If you do not, please ask me to enable the private box. The private box looks like this:

hidden link

December 19, 2023 at 5:52 pm #15095725

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)

Hello,

thank you for sharing. After investigating your issue, I found out that the 502 error is due to a conflict between Hotel Booking and WPML. I will escalate your issue to our development team so they can find a permanent solution for your issue. That usually take a few days, so I'll keep you posted as soon as I have a feedback from them.

Best regards,
Lucas Vidal

December 27, 2023 at 8:33 am #15131267

federicoA-21

Hi Lucas! Is there any news?

December 27, 2023 at 11:50 am #15131933

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)

Hello,

I didn't receive any feedback from our development team yet, we have a high workload and the holidays, so it's probable it's going to take a few days until we have an answer. Just to give you some context, what's going on is a conflict between the Hotel Booking Plugin and WPML, which causes a server error (the 502 you are experiencing). It's probable that there's something causing a high workload, which causes the error. That's what they are investigating at the moment. Thank you for your patience! I'll give you feedback as soon as hear from our developers.

Happy holidays,
Lucas Vidal

January 3, 2024 at 12:28 pm #15146449

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)

Hello,

Thank you for your patience. I got feedback from our developers, they said that the issue couldn't be reproduced. Indeed, after analyzing your website right now, I didn't get any 500 errors anymore. Can you please confirm if your website is working as expected? Please test it by translating some content and checking it in second languages.

I'll wait for your feedback.

January 4, 2024 at 8:26 am #15149500

federicoA-21

haveing a better look, seems like the error 502 happens only when i'm logged in to the site backend.

Right now i've translated the entire site, and beyond this 502 error, the graphics in other languages are way broken.

Can you please have look? You should have the backend credentials also

January 4, 2024 at 9:56 am #15149839

federicoA-21

after translating the whole site the 502 seems gone even from backend side, but the site graphic is broken (expect for italian)

January 4, 2024 at 2:14 pm #15151032

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)

Hello,

Perhaps it was a temporary error, I'm glad that the 500 error is not happening anymore. As for the broken layout, I analyzed a few pages and saw that some shortcodes were either untranslated or not correctly translated.

In the "Il sogno" page for instance, the hero slider was translated to english, but it shouldn't (see screenshot). Also, on the "Gli alloggi disponibili" part, the shortcode itself didn't have any text assigned to it in the translation (also see screenshot). It's recommended to manually search for shortcodes and links, as they might not always show up directly on the Translation Editor. Here's a detailed explanation, in case you find it necessary:

https://wpml.org/faq/how-to-translate-urls-shortcodes-and-html-attributes-using-the-advanced-translation-editor/

Please let me know if you have any further questions.

Advanced Translation Editor - WPML.jpeg
Advanced Translation Editor - WPML · 11.12am · 01-04.jpeg
January 4, 2024 at 5:10 pm #15152564
federicoA-21

that plugin (Motopress Hotel Booking) shortcode looks fine, it's compatible with wpml so looks like i don't need to translate manually.

Maybe the only thing left is a pseudo element that you can see in the off canvas element at the bottom of the page (the text is "Prenota ora").

I tried this css code, but it's not working:

:lang(uk) .dateWrapper::before {
content: 'Book now';
}

:lang(fr) .dateWrapper::before {
content: 'Reserve maintenant'!important;
}

New threads created by Lucas Vidal de Andrade and linked to this one are listed below:

https://wpml.org/forums/topic/split-translate-wphb-book-now/

January 4, 2024 at 10:17 pm #15153078

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)

Usually, when an element of a shortcode is not behaving as expected in a second language, like the pseudo-element you mentioned, it's because that shortcode is not properly registered on WPML. Using CSS, even if it works, might not be the best way to solve it, as it would work only as a workaround.

I'll get a second opinion on the best approach to solve it and will get back to you.

January 5, 2024 at 1:12 pm #15154513

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)

Hello,

After investigating the issue, I decided to create a separate ticket for it, so we have everything organized and can look at one issue per ticket:

https://wpml.org/forums/topic/split-translate-wphb-book-now/

Can you confirm that the 500 error issue was resolved?

January 5, 2024 at 4:22 pm #15155787

federicoA-21

yes, seems gone now