Skip Navigation

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

Problem:
The client was receiving deprecated messages related to the

explode()

function when accessing the translation management section of their site.

Solution:
We recommended inserting custom PHP code into the theme's

functions.php

file to address the issue. The code provided is as follows:

add_filter( 'wpml_pb_should_handle_content', function($handle_content, $shortcode){<br />    if ( empty( $shortcode['content'] ) ) {<br />        $handle_content = false;<br />    }<br />    return $handle_content;<br />}, 10, 2);

Please note that this solution might be outdated or not applicable to your case. If the issue persists, we encourage you to open a new support ticket. We also highly recommend checking the related known issues, verifying the version of the permanent fix, and confirming that you have installed the latest versions of themes and plugins. If further assistance is needed, please contact us through 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 12 replies, has 2 voices.

Last updated by Kor 1 year ago.

Assisted by: Kor.

Author Posts
April 22, 2024 at 1:45 pm #15550901

hansW-15

I was working on a site a copple of months ago and started working on it just again and now i see a lot of depricated messages when i go to translation management.
Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/hsalquiler.es/httpdocs/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/strategy/shortcode/class-wpml-pb-register-shortcodes.php on line 151

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/hsalquiler.es/httpdocs/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/strategy/shortcode/class-wpml-pb-register-shortcodes.php on line 151

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/hsalquiler.es/httpdocs/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/strategy/shortcode/class-wpml-pb-register-shortcodes.php on line 151

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/hsalquiler.es/httpdocs/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/strategy/shortcode/class-wpml-pb-register-shortcodes.php on line 151

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/hsalquiler.es/httpdocs/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/strategy/shortcode/class-wpml-pb-register-shortcodes.php on line 151

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /var/www/vhosts/hsalquiler.es/httpdocs/wp-content/plugins/sitepress-multilingual-cms/addons/wpml-page-builders/classes/Shared/st/strategy/shortcode/class-wpml-pb-register-shortcodes.php on line 151

April 23, 2024 at 9:36 am #15554692

hansW-15

Hi Kor, it should work again. I've put back the latest backup

April 23, 2024 at 9:46 am #15554801

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

I'm still getting the credentials invalid error. Could you please double check?

April 23, 2024 at 10:10 am #15554946

hansW-15

The user name is only wpml

April 23, 2024 at 10:31 am #15555175

hansW-15

I made a tpo, it's hidden link

April 24, 2024 at 8:10 am #15559193

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for getting back to me.

I've reviewed your website, and it appears that you've reverted the change, as the PHP deprecated notice is no longer visible.

To facilitate further investigation by our 2nd Tier Support, I will remove your account from the translator section at hidden link and attempt to replicate the issue again.

I'll provide you with an update once I've received feedback.

April 24, 2024 at 8:15 am #15559242

hansW-15

Here it's still occurring. When you do as in the video shown, the deprecation error shows.

April 24, 2024 at 8:19 am #15559289

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Yes, I can replicate this as shown in the attached screen recording hidden link . I will escalate this now to our 2nd Tier Support for further investigation.

April 25, 2024 at 4:34 pm #15566834

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your patience.

I have a feedback and kindly insert the custom PHP code below into your theme's functions.php file for the workaround fix.

add_filter( 'wpml_pb_should_handle_content', function($handle_content, $shortcode){

    if ( empty( $shortcode['content'] ) {
        $handle_content = false;
    }

    return $handle_content;
}, 10, 2);
April 28, 2024 at 1:57 pm #15574010

hansW-15

Thank you Kor, I'll try it.

April 28, 2024 at 6:37 pm #15574251

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thanks for your reply.

Alright then, please let me know how it goes.

April 29, 2024 at 9:35 am #15576028
hansW-15

Hi Kor, this issue has been resolved but another came up. I hope you can help with that as well.
I use Checkout Field Editor for WooCommerce by ThemeHigh and translated the strings but they don't show up at the front-end.
If you would take a look, here's your temporary access:

hidden link

New threads created by Kor and linked to this one are listed below:

https://wpml.org/forums/topic/checkout-field-editor-for-woocommerce-by-themehigh-cannot-be-translated/

April 29, 2024 at 1:49 pm #15577459

Kor
WPML Supporter since 08/2022

Languages: English (English )

Timezone: Asia/Singapore (GMT+08:00)

Thank you for getting back to us.

I want to inform you that our support policy dictates that we address only one issue per ticket. Maintaining this approach allows our support team to concentrate on one problem at a time, facilitating quicker solutions for other users with their inquiries.

Therefore, I have divided your ticket, which can be found here https://wpml.org/forums/topic/checkout-field-editor-for-woocommerce-by-themehigh-cannot-be-translated/, to ensure proper follow-up.

Regarding this specific ticket, please mark it as resolved.