Skip to content Skip to sidebar

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

Problem:
If you're experiencing blank or white pages on product pages using WoodMart custom layouts when WPML is active, and this only occurs with products having many variations (10-15+), while products with fewer variations display correctly, we can help.
Solution:
We recommend updating a specific function in your WPML plugin files. Please locate the file

sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/class-wpml-elementor-adjust-global-widget-id.php

and modify the function

duplicate_css_class_with_original_id

around line 132 to the following:

public function duplicate_css_class_with_original_id( $content ) {<br />    $classPrefixes = implode( '|', [ 'elementor-', 'elementor-global-' ] );<br />    $pattern       = '/(class="[^"]*?((?:' . $classPrefixes . ')))(\d+)/';<br />    $result        = preg_replace_callback( $pattern, [ $this, 'convert_id_to_original' ], $content );<br /><br />    if ( null === $result ) {<br />        return $content;<br />    }<br /><br />    return $result;<br />}

After applying this change, please clear any caches on your site to see if the issue resolves. This modification addresses template display failures due to the PHP setting

pcre.backtrack_limit

being exhausted. A permanent fix is anticipated in WPML 4.9.

If this solution does not apply to your case, or if it becomes 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. Should you need further assistance, please open a new support ticket at 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 21 replies, has 1 voice.

Last updated by Юрій Воробйов 4 months, 1 week ago.

Assisted by: Bruno Kos.

Author Posts
December 16, 2025 at 5:21 pm #17668823

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hi,

With the help of our sysadmins, we checked the logs and also enabled the WordPress error log and identified the cause of the crash. Woodmart alone, even without WPML, is using over 152MB—exceeding the available memory. For now, we’ve increased the memory limits to make the system accessible.

You can now try reproducing the issue on the Sandbox by creating an identical example product, which is fully configured with WPML and WCML in Ukrainian.

Best regards,
Marcel

December 17, 2025 at 10:10 am #17670434

Юрій Воробйов

Hi Marcel,
Good news — I created a product with 48 variations and custom WoodMart layout in the sandbox, and it works. The product page renders correctly.
So the issue doesn't reproduce in the sandbox, but it persists on my production site.
We need to identify what's different between the sandbox and my site. The only difference I notice so far is that I'm using Elementor Pro on my site, while the sandbox has the free version.
Could this be related? Or are there other configuration differences we should investigate?
Please advise on next steps to pinpoint the cause.
Best regards

December 17, 2025 at 1:41 pm #17671190

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hi,

thanks! I tested this at the beginning as well.

It also works with Elementor disabled; however, for testing purposes I kept the free version of Elementor active.

The config on "Settings" shoudl not make a big difference here, except if you changed any custom field pre-default configs.

The settings configuration should not make a significant difference here, unless you’ve modified any custom field default values.

At this point, I suggest that I create a Duplicator package so we can debug the issue on a local copy of your site where it is reproducible. If we can’t reliably reproduce the problem, we won’t be able to address it as a compatibility bug.

Does that sound good? If so, I’ll proceed.

Best regards,
Marcel

December 17, 2025 at 2:27 pm #17671404

Юрій Воробйов

Hi Marcel,

Yes, please proceed.

I've created a Duplicator package using the "Two-Part Install" method because the full archive is significantly larger than 500MB. The package contains only the database backup — you'll need to transfer the website files via FTP using the credentials I provided earlier, and grab the installer from the Duplicator plugin page in wp-admin.

Also, I've set up a staging site from the production site, removed all products from it, and I'm currently in the process of importing them to test there as well.

Let me know if you need anything else.

Thanks!

December 22, 2025 at 3:37 pm #17682835

Marcel
Supporter

Languages: English (English ) Spanish (Español ) German (Deutsch )

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

Hi,

I’m unable to access the FTP. I’m receiving the following error:

Response: 530 Login authentication failed
Error: Critical error: Could not connect to server

Could you please check this on your end?
Thank you!

Best regards,
Marcel

December 24, 2025 at 10:41 am #17686480

Юрій Воробйов

Host: rs7-fra.serverhostgroup.com

December 24, 2025 at 11:56 am #17686558

Bruno Kos
WPML Supporter since 12/2018

Languages: English (English ) German (Deutsch ) French (Français )

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

Hi,

Could you please try the following change on your site and let us know the result?

In this file:

`sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/class-wpml-elementor-adjust-global-widget-id.php`

Please update the function `duplicate_css_class_with_original_id` (around line 132) so it looks exactly like this:

	public function duplicate_css_class_with_original_id( $content ) {
		$classPrefixes = implode( '|', [ 'elementor-', 'elementor-global-' ] );
		$pattern       = '/(class="[^"]*?((?:' . $classPrefixes . ')))(\d+)/';
		$result        = preg_replace_callback( $pattern, [ $this, 'convert_id_to_original' ], $content );

		if ( null === $result ) {
			return $content;
		}

		return $result;
	}

After making the change, please clear any caches and check whether the issue is resolved.

For context, the underlying issue is related to templates failing to display when the PHP setting `pcre.backtrack_limit` is exhausted.

A permanent fix is planned and may be included in WPML 4.9.

Please let me know about the results in your site!

December 24, 2025 at 12:17 pm #17686569

Юрій Воробйов

Hi Bruno,
Thank you for providing the fix! I have successfully applied the suggested solution on my development site.
What was done:

Edited the file /wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Integrations/Elementor/class-wpml-elementor-adjust-global-widget-id.php
Replaced the duplicate_css_class_with_original_id function with the optimized version from your code
Saved the changes and tested the site

Result:
Pages now load correctly, and Elementor templates display properly. The regex backtrack limit issue is resolved.
Looking forward to the official WPML 4.9 release with this fix included.
Thank you for the quick and effective support!