Skip to content Skip to sidebar

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

Problem:
The client was experiencing a server error on all pages except the home page, with a fatal error indicating infinite recursion. The error was traced back to excessive translated copies of a post (UX-Block), exceeding 2500 instances.
Solution:
We recommended the following steps to address the issue:
1. Clear Cache: Clear all levels of cache including:
- WPML’s internal cache from WPML > Support > Troubleshooting > Clear the cache in WPML, and disable Language Switcher Cache.
- Any caching plugins on the site.
- CDN cache if applicable.
2. Test in Minimal Environment: Deactivate all plugins except for WPML CMS and switch temporarily to a default WordPress theme like Twenty Twenty-one to check if the issue persists. It's important to back up the database before performing this test.
Following these steps, the client resolved the error by identifying and removing the post and its numerous translated copies.

Please note that this solution might be outdated or not applicable to your specific case. If you're still experiencing issues, we highly recommend checking for related 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: 

This topic contains 1 reply, has 0 voices.

Last updated by dimitriV-10 6 months, 2 weeks ago.

Assisted by: Lucas Vidal de Andrade.

Author Posts
September 17, 2025 at 9:48 pm #17411278

dimitriV-10

<b>Background of the issue: </b>
I am trying to access the site, but all pages besides the home page return a server error. The issue can be seen on this page: hidden link

<b>Symptoms: </b>
Fatal error infinite recursion. Instead of seeing the web page, I got an error.

<b>Questions: </b>
Why am I encountering a server error on all pages except the home page?
What is causing the fatal error infinite recursion?

<b> Stack Trace </b>
Une erreur de type E_ERROR a été causée dans la ligne 37 du fichier /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php. Message d’erreur : Uncaught Error: Maximum call stack size of 8339456 bytes (zend.max_allowed_stack_size - zend.reserved_stack_size) reached. Infinite recursion? in /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php:37
Stack trace:
#0 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(51): WPML\FP\Logic::hasMacro('isArray')
#1 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Logic.php(129): WPML\FP\Logic::__callStatic('isArray', Array)
#2 [internal function]: WPML\FP\Logic::{closure:WPML\FP\Logic::init():128}(Array)
#3 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array(Object(Closure), Array)
#4 [internal function]: WPML\FP\Logic::{closure:{closure:WPML\FP\curryN():136}:137}(Array)
#5 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array(Object(Closure), Array)
#6 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Fns.php(142): WPML\FP\Logic::__callStatic('isMappable', Array)
#7 [internal function]: WPML\FP\Fns::{closure:WPML\FP\Fns::init():141}(Object(Closure), Array)
#8 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array(Object(Closure), Array)
#9 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php(244): {closure:{closure:WPML\FP\curryN():136}:137}(Array)
#10 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php(205): WPML\FP\Obj::{closure:{closure:WPML\FP\Obj::init():242}:243}(Array)
#11 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Obj.php(247): WPML\FP\Obj::{closure:{closure:{closure:WPML\FP\Obj::init():198}:199}:200}(Object(WPML_Translator))
#12 [internal function]: WPML\FP\Obj::{closure:WPML\FP\Obj::init():242}(Object(Closure), Object(Closure), Object(WPML_Translator))
#13 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(154): call_user_func_array(Object(Closure), Array)
#14 [internal function]: WPML\FP\Obj::{closure:{closure:WPML\FP\curryN():136}:137}(Object(Closure), Object(Closure), Object(WPML_Translator))
#15 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/collect/src/Illuminate/Support/Traits/Macroable.php(56): call_user_func_array(Object(Closure), Array)
#16 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/API/Translators.php(24): WPML\FP\Obj::__callStatic('over', Array)
#17 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/classes/ATE/Review/ReviewTranslation.php(56): WPML\TM\API\Translators::getCurrent()
#18 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/functions.php(17): WPML\TM\ATE\Review\ReviewTranslation->{closure:WPML\TM\ATE\Review\ReviewTranslation::add_hooks():50}(Array, Array, Array)
#19 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(207): {closure:WPML\FP\spreadArgs():16}(Array)
#20 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Either.php(257): WPML\FP\Right->map(Object(Closure))
#21 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/fp/core/Promise.php(24): WPML\FP\Right->chain(Object(Closure))
#22 /home/bkwqemn/hswww/wp-content/plugins/sitepress-multilingual-cms/vendor/wpml/wp/classes/Hooks.php(50): WPML\FP\Promise->resolve(Object(WPML\FP\Right))
#23 /home/bkwqemn/hswww/wp-includes/class-wp-hook.php(326): WPML\LIB\WP\Hooks::{closure:WPML\LIB\WP\Hooks::onHook():49}(Array, Array, Array)
#24 /home/bkwqemn/hswww/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array)
#25 /home/bkwqemn/hswww/wp-includes/class-wp-user.php(815): apply_filters('user_has_cap', Array, Array, Array, Object(WP_User))
#26 /home/bkwqemn/hswww/wp-includes/capabilities.php(1018): WP_User->has_cap('edit_post', 160)
#27 /home/bkwqemn/hswww/wp-includes/capabilities.php(911): user_can(Object(WP_User), 'edit_post', 160)
#28 /home/bkwqemn/hswww/wp-includes/link-template.php(1474): current_user_can('edit_post', 160)
#29 /home/bkwqemn/hswww/wp-content/themes/flatsome/inc/builder/core/server/helpers/urls.php(38): get_edit_post_link(Object(WP_Post), 'raw')
#30 /home/bkwqemn/hswww/wp-content/themes/flatsome/inc/post-types/post-type-ux-blocks.php(150): ux_builder_edit_url(160, 160)
#31 /home/bkwqemn/hswww/wp-includes/shortcodes.php(434): block_shortcode(Array, '', 'block')
#32 [internal function]: do_shortcode_tag(Array)
#33 /home/bkwqemn/hswww/wp-includes/shortcodes.php(273): preg_replace_callback('/\\[(\\[?)(block)...', 'do_shortcode_ta...', '

September 18, 2025 at 8:02 am #17412006

Lucas Vidal de Andrade
WPML Supporter since 11/2023

Languages: English (English ) Spanish (Español ) German (Deutsch ) Portuguese (Brazil) (Português )

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

Hello,

Thank you for contacting WPML support team,

There are a couple of things to try and check to better understand the issue.

1. Clear Cache
If caching is enabled (browser, WPML, or server-level cache), clear it:
Clear WPML’s internal cache from WPML > Support > Troubleshooting > Clear the cache in WPML. and then click on Disable Language Switcher Cache
Clear any caching plugins on your site.
Clear your CDN cache if you’re using one.

2. Test in Minimal Environment
Please check if the issue persists in a minimal environment by following these steps.
1- Deactivate all the plugins except WPML CMS.
2- Switch for a moment to a WordPress default theme like Twenty Twenty-one.
If the issue is gone, activate them one by one to see which one there is causing a conflict issue.
Please backup your database before performing the above test.

Let me know your results.

September 19, 2025 at 9:28 am #17416051

dimitriV-10

Your suggestion didn't change anything.
However looking at the error log I saw it mentionned a specific content.
There were more than 2.500 translated copies of a post (UX-Block).
I removed the post and the copies and it solved the error.

I don't know why WPML created more than 2500 translated versions from a single posts...