Skip to content Skip to sidebar

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

Problem:
If you're experiencing issues when switching your site's language from German to English, particularly on the homepage, and encountering a timeout error, the problem might be related to your theme settings. Additionally, if your header and footer translations are sometimes not working, this could also be linked to the same issue.
Solution:
We found that the issue occurs only when both the Child Theme and Elementor Pro are active. Switching to the parent theme resolves the issue, indicating a problematic function in your Child Theme's code. We recommend commenting out the following code in your Child Theme:

function custom_shop_footer_output() {<br />    if (!function_exists('elementor_theme_do_location') || !elementor_theme_do_location('footer')) {<br />        get_footer('shop');<br />    }<br />}<br />add_action('wp_footer', 'custom_shop_footer_output');

This function likely causes an endless recursion leading to a timeout because it repeatedly calls itself. We suggest that you or your developer revise this function to prevent further errors.

If this solution does not apply to your case, or if it seems outdated, we 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. If issues persist, 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.

This topic contains 4 replies, has 0 voices.

Last updated by Lucas Vidal de Andrade 1 month, 2 weeks ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
August 8, 2025 at 1:56 pm

erjonG

Background of the issue:
I am trying to switch the site's language from German to English, specifically on the homepage, but it's not working. The issue can be seen on this page: hidden link

Symptoms:
The site is getting a timeout error when switching from German to English. Additionally, when it was working, the header and footer translations sometimes did not work.

Questions:
Why is the site getting a timeout error when switching languages?
Why are the header and footer translations sometimes not working?

August 8, 2025 at 4:54 pm #17306049

erjonG

Hello,
I found this in the server LOGs:

Screenshot
hidden link

Thank you
Regards
Erjon

August 8, 2025 at 8:26 pm #17306286

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English )

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

Hello there,

Thank you for waiting. The message you shared is probably not related to the problem, it's just a deprecated notice. Though I can't 100% confirm.

After a more thorough investigation, I found the following:

1. The issue happens only if your Child Theme and Elementor Pro are active;
2. Switching to the parent theme solves the issue;

This indicated that there was some function causing a time-out on your child-theme's code. With your Child Theme activated, I commented out the code below:

function custom_shop_footer_output() {
	if ( ! function_exists( 'elementor_theme_do_location' ) || ! elementor_theme_do_location( 'footer' ) ) {
		get_footer( 'shop' );
	}
}
add_action( 'wp_footer', 'custom_shop_footer_output' );

And the website started working again. What's likely happening, is that get_footer() loads the footer template, and the footer template calls do_action( 'wp_footer' ) again ➜ your function runs again ➜ calls get_footer() again… rinse, repeat → endless recursion → timeout.

I recommend that you, or your developer, check this function, so it doesn't cause any errors.

Screenshot 2025-08-08 at 17.21.25.jpg
August 9, 2025 at 9:24 am #17306676
erjonG

Dear Lucas,

thank you for the support.

I commented that code and kindly I ask to see again:
In German the header + slider + below text is fine: hidden link

In English those disappear: hidden link

Can you please help on this as well?

Thank You
Regards
Erjon

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

https://wpml.org/forums/topic/split-inconsistent-elementor-template-on-translation/

August 11, 2025 at 7:17 pm #17311282

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English )

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

Hey there,

Since this issue is not related to the initial issue you brought, I've created a new ticket to address it. I'll answer you directly there:

https://wpml.org/forums/topic/split-inconsistent-elementor-template-on-translation/

Thank you.