Skip to content Skip to sidebar

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

Problem:
The client experienced a noticeable slowdown and layout issues with Elementor after installing WPML. Elements such as headers and footers disappeared or appeared broken, and styles like text colors were affected. The issues were resolved upon deactivating WPML.
Solution:
We initially suggested a WPML reset and reinstallation, which did not resolve the issue. After further investigation, we identified the problem was related to the PHP settings on the hosting environment, specifically the

pcre.backtrack_limit

configuration. We applied a workaround by adding the following code to the

wp-config.php

file:

ini_set("pcre.backtrack_limit", 10000000);
ini_set("pcre.jit", 1);

This code increases the

pcre.backtrack_limit

and enables

pcre.jit

, which resolved the issue. More information about

pcre.backtrack_limit

can be found here.

Please note that this solution might be irrelevant if it's outdated or not applicable to your case. If the problem persists, 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 necessary, please open a new support ticket in the WPML support forum.

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 15 replies, has 2 voices.

Last updated by Long Nguyen 1 year, 4 months ago.

Assisted by: Long Nguyen.

Author Posts
March 11, 2024 at 8:06 am #15393393

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Hi,

The issue is related to the function preg_replace_callback() in the file wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/class-wpml-elementor-adjust-global-widget-id.php
around line 138 and the limitation of PHP setting on your hosting.

Use the code above to increase backtrack_limit and fix the issue. You can get more information about backtrack_limit here https://stackoverflow.com/questions/23483114/what-is-the-unit-of-pcre-backtrack-limit

Thanks.

March 18, 2024 at 5:07 am #15419168

gerardR-3

Thanks Long,

We are still translating the content and haven't finished testing yet. I'll come back to this ticket later.

March 18, 2024 at 7:01 am #15419282

Long Nguyen
WPML Supporter since 02/2022

Languages: English (English )

Timezone: Asia/Ho_Chi_Minh (GMT+07:00)

Let me know if you have any questions.

Thanks.