[Resolved] Deprecated warnings in WPML String Translation
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.
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?
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.--
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.
Manage Cookie Consent
We use cookies to optimize our website and services. Your consent allows us to process data such as browsing behavior. Not consenting may affect some features.
Functional
Always active
Required for our website to operate and communicate correctly.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
We use these to analyze the statistics of our site. Collected information is completely anonymous.The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
These cookies track your browsing to provide ads relevant to you.