Skip Navigation

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

Problem:
The client encountered a PHP warning related to

preg_match()

on their website.
Solution:
We have reproduced a similar issue and have provided a temporary workaround in our Errata. We recommend following the steps outlined there to resolve the issue:

If the issue persists, we advise the client to share the full error message from the WordPress Debug log for further assistance. For guidance on enabling WordPress debugging, please refer to:

Please note that the solution provided might be outdated or not applicable to your case. If the issue remains unresolved, 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 necessary, do not hesitate to open a new support ticket with us for further assistance.

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

Last updated by Prosenjit Barman 1 year, 1 month ago.

Assisted by: Prosenjit Barman.

Author Posts
March 18, 2024 at 4:06 am #15419093

rogerJ-4

I am trying to:

Link to a page where the issue can be seen: hidden link

I expected to see:

Instead, I got:

March 18, 2024 at 12:30 pm #15420817

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hello There,
Thanks for contacting WPML Support.

I understand that you're seeing the "preg_match():" warning on your site. As you haven't shared the full error log, it is difficult to say from where it originates, however, we are aware of a "preg_match" warning that usually gets solved by saving the permalink structure. Would you please try doing the same?

- Please go to "Settings > Permalinks"
- Set the default permalink structure to "Post Name"
- Save the settings

Clear the caches from your site and check if that helps to solve the issue. However, since they are Warning only, you can ignore them by disabling the WordPress debug log. Check the guide below to understand the process of disabling the debug log.

- https://wpml.org/documentation/support/debugging-wpml/#enabling-the-built-in-debugging-feature-in-wordpress

Change "define('WP_DEBUG', true);" to "define('WP_DEBUG', false);"

Let me know if the information above helps or if you need further assistance. I will be happy to help.

Best regards,
Prosenjit

March 21, 2024 at 1:43 am #15434101

rogerJ-4

I followed all instructions, problem never solved.
I restore my backup, I found this problem is happening following WooCommerce plugins updates.

March 21, 2024 at 6:47 am #15434342

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hello There,
Thank you for the update.

Could you please activate the WordPress Debug mode and share the complete error log with me? This will allow me to more accurately assess the issue at hand.

I also would like to inform you that in one of the cases, we found that the same warning disappears when we deactivate the "XML Sitemap Generator for Google" plugin and resave the permalink structure. Since this plugin is also active on your site, would you please check again by deactivating the plugin nd then resaving the permalink structure?

Please let me know how it goes. I will be happy to help if you need further assistance in this matter.

Best regards,
Prosenjit

March 22, 2024 at 7:01 am #15438818

Prosenjit Barman
WPML Supporter since 03/2023

Languages: English (English )

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

Hi There,

Thanks for providing the WPML Debug Information. However, I was actually looking for the specific errors logged in the WordPress Debug log to better understand the issue.

I wanted to let you know that we've reproduced an issue similar to the warning you described. We've found a temporary solution for the issue and outline the solution in the Errata below. Please follow the workaround provided there to see if it resolves your problem.

- https://wpml.org/errata/php-warning-preg_match-unknown-modifier/

Please let me know the outcome. If the problem continues, share the full error message from the WordPress Debug log in the next response. This will give me a clearer view of the issue and assist in finding a resolution.

To understand the process of enabling WordPress debugging, check this guide: https://wpml.org/documentation/support/debugging-wpml/

Looking forward to your response.

Best regards,
Prosenjit

March 22, 2024 at 2:03 pm #15441157

rogerJ-4

Works, Great support
Much appreciated