Skip to content Skip to sidebar

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

Problem:
You are experiencing deprecated warnings for preg_match in the WPML String Translation plugin while using the WP backend. The error message indicates that passing null to parameter #2 ($subject) of type string is deprecated, located in wp-content/plugins/wpml-string-translation/classes/slug-translation/custom-types/wpml-st-slug-custom-type.php:69.
Solution:
We recommend updating to the latest version of WPML, specifically to version 4.6.12, which addresses this issue. If the problem persists after updating, or if this solution 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.

If you need further assistance, please do not hesitate to open a new support ticket or visit our support forum 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 3 replies, has 2 voices.

Last updated by Itamar 1 year ago.

Assisted by: Itamar.

Author Posts
July 8, 2024 at 12:12 pm #15912992

michaelE-12

Background of the issue:
Using the WP backend, we're getting a lot of deprecated warnings for preg_match in the WPML String Translation plugin. The site is running WordPress 6.5.5 with PHP 8.2.20. The following relevant WPML plugins are installed: WPML Multilingual CMS - 4.6.11, WPML String Translation - 3.2.12, WooCommerce Multilingual & Multicurrency - 5.3.6, Gravity Forms Multilingual - 1.8.1, WPML SEO - 2.1.0. I can patch the file wpml-st-slug-custom-type.php manually but an official fix would be preferable.

Symptoms:
Deprecated warnings for preg_match in the WPML String Translation plugin: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated. Error location: wp-content/plugins/wpml-string-translation/classes/slug-translation/custom-types/wpml-st-slug-custom-type.php:69

Questions:
Is there an official fix for the deprecated warnings in the WPML String Translation plugin?
Do you need any further details and/or access to the site to resolve this issue?

July 8, 2024 at 12:40 pm #15913228

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

When you have the staging site ready, please share access to your site with the Deprecated warnings for preg_match in the WPML String Translation plugin. Please explain to us where and how to see the problem.

If you need further help with this, please share the access details to your site with me.
I'm enabling a private message for the following reply.

Privacy and Security Policy
We have strict policies regarding privacy and access to your information. Please see:
https://wpml.org/purchase/support-policy/privacy-and-security-when-providing-debug-information-for-support/
**IMPORTANT**
- - Please backup the site files and database before providing us access. --
-- If you have a staging site where the problem can be reproduced, it is better to share access to the staging site.--

Thanks,
Itamar.

July 10, 2024 at 10:23 am #15927559

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

This case is now escalated to our developers and will be fixed in future versions of WPML.

We will update here once the version with the fix is released.

Thank you for your patience.
Itamar.

July 25, 2024 at 12:58 pm #16003691

Itamar
WPML Supporter since 02/2016

Languages: English (English )

Timezone: Asia/Jerusalem (GMT+03:00)

Hi,

This issue is fixed with the latest version of WPML - 4.6.12.

We're closing this ticket.

Don't hesitate to contact us again with any WPML issues or questions.

Regards,
Itamar.