Skip Navigation

[Resolved] Migration from PHP 7.5 to PHP 8.1, part 2

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 10:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Kolkata (GMT+05:30)

This topic contains 6 replies, has 2 voices.

Last updated by Minesh 4 months, 2 weeks ago.

Assisted by: Minesh.

Author
Posts
#2685585

Tell us what you are trying to do?

Minesh supported this case for part 1, now I open a new ticket for part 2.

When looking at the website with PHP 8.1 and with debugging option showing remarks in the display, I found a lot of remarks concerning 'depreciated functions' in types or Toolset respectively. You find in the following the links and the debugging comments:

LIST OF LAWS
hidden link

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/franzgas/www/rechtskonform.ch/wp-content/plugins/toolset-blocks/vendor/toolset/common-es/server/Rest/Route/ShortcodeRender/WithMeta.php on line 55

I looked at the code in withmeta.php:

public function wpv_content_template_meta() {
if( preg_match( '#view_template=[\"\'](.*?)[\"\']#', $this->shortcode, $ct ) ) {
if( $post = get_page_by_path( $ct[1], OBJECT, 'view-template' ) ) {
$this->meta_data['post_title'] = $post->post_title;
$this->meta_data['post_edit_link'] = admin_url( 'admin.php?page=ct-editor&ct_id=' . $post->ID );
}

NEWS
hidden link

Deprecated: explode(): Passing null to parameter #2 ($string) of type string is deprecated in /home/franzgas/www/rechtskonform.ch/wp-content/plugins/toolset-blocks/vendor/toolset/dynamic-sources/server/DynamicSources.php on line 685

LIST OF PROFESSIONAL FORMATION
hidden link

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array|string is deprecated in /home/franzgas/www/rechtskonform.ch/wp-content/plugins/toolset-blocks/vendor/toolset/toolset-common/inc/autoloaded/date_utils.php on line 286

So in all cases, the error messages are repeated as much as the number of single posts is. Am I using deprecated functions? I looked at shortcodes and dynamic sources, but could not find something wrong.

Is there any documentation that you are following?
Toolset documentation.

I would prefer to get support from Minesh, because he has already the credentials to login on our website.

#2685597

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

Thank you for reporting this.

The first one you reported, I reported before but unfortunately we do not have the steps to reproduce but its still with our ticket log.

Deprecated: preg_match(): Passing null to parameter #2 ($subject) of type string is deprecated in /home/franzgas/www/rechtskonform.ch/wp-content/plugins/toolset-blocks/vendor/toolset/common-es/server/Rest/Route/ShortcodeRender/WithMeta.php on line 55

Can you please send me duplicator copy of your site so that we can check with what setup those notices are get displayed.
- https://toolset.com/faq/provide-supporters-copy-site/

#2685692

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Unfortunately - I could not able to login to the admin using the admin access details you shared.

Can you please send me working admin access details.

I have set the next reply to private which means only you and I have access to it.

#2686264

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

I've escalated the issue about deprecated notices with PHP 8.1 to our next level support.

Please hold on for further updates. Please note that there is no ETA when the fix is officially publish for this issue.

#2686306

Hi Minesh,

many thanks for your support. Will I be informed automatically, when an optimization has been implemented?

Kind regards

Franz

#2686381

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Yes - I will inform you when deprecated notices are fixed.

#2707114

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Just to let you know that the fix for this issue is already published with the latest Toolset plugins.

We publish hotfix version for many Toolset plugins:
- https://toolset.com/2024/07/toolset-1-6-16-essential-updates-for-wordpress-6-6-and-better-workflow/

*** Please make a FULL BACKUP of your database and website.***
Cam you please update ALL Toolset plugins to it's latest official release version and check if that help you to fix the issue.

More info:
- https://toolset.com/faq/how-to-install-and-register-toolset/#automatic-update-requires-registratio

OR

You can download the latest Toolset plugins from your account's page:
- https://toolset.com/account/downloads/

In addition to that the notice on the following page:
LIST OF PROFESSIONAL FORMATION
- hidden link

Deprecated: preg_replace(): Passing null to parameter #3 ($subject) of type array\|string is deprecated in /home/franzgas/www/rechtskonform.ch/wp-content/plugins/toolset-blocks/vendor/toolset/toolset-common/inc/autoloaded/date_utils.php on line 286

The above notice comes about because of a problem in your site, in the output of the View on the referenced page, a custom field is output via types shortcode and it includes a typo for the "format" attribute. Please check the following screenshot.
- hidden link

Please adjust the format attribute name correctly.

#2707500

Hi Minesh,
many thanks for your support, I could now correct almost all errors (some of them, I will treat later on).
Many greetings Franz