Wp-block-parser.php error after Cornerstone upgrade to 5.1.2

Hi,
I am seeing those error messages on the home page of one of my client sites after updating cornerstone to 5.1.2 (cache purged, performed plugin updates one by one to isolate the issue to cornerstone).

url: https://officeworks.co.uk/

These are the error messages:
Warning : preg_match() expects parameter 2 to be string, array given in /home/officewo/public_html/wp-includes/class-wp-block-parser.php on line 417

Warning : strlen() expects parameter 1 to be string, array given in /home/officewo/public_html/wp-includes/class-wp-block-parser.php on line 489

Can you help? Is this a known bug?

PS: re-installing WordPress core doesn’t solve it

Hugues

1 Like

I have the except same problem at the moment.

And after the theme update i got the follow back-end error

Fatal error : Uncaught Error: Call to undefined method TGM_Plugin_Activation::is_plugin_activated() in /home/polderev/public_html/wp-content/themes/x/framework/functions/x/validation/class-validation-cornerstone.php:55 Stack trace: #0 /home/polderev/public_html/wp-includes/class-wp-hook.php(287): X_Validation_Cornerstone->maybe_show_notices(’’) #1 /home/polderev/public_html/wp-includes/class-wp-hook.php(311): WP_Hook->apply_filters(’’, Array) #2 /home/polderev/public_html/wp-includes/plugin.php(484): WP_Hook->do_action(Array) #3 /home/polderev/public_html/wp-admin/admin-header.php(292): do_action(‘admin_notices’) #4 /home/polderev/public_html/wp-admin/plugins.php(603): require_once(’/home/polderev/…’) #5 {main} thrown in /home/polderev/public_html/wp-content/themes/x/framework/functions/x/validation/class-validation-cornerstone.php on line 55

// I did a back up, so you don’t see the errors anymore.

Same type of issues here: https://chadbirt.com

Warning : preg_match() expects parameter 2 to be string, array given in /home/customer/www/chadbirt.com/public_html/wp-includes/class-wp-block-parser.php on line 417

Warning : strlen() expects parameter 1 to be string, array given in /home/customer/www/chadbirt.com/public_html/wp-includes/class-wp-block-parser.php on line 489

Warning : preg_match() expects parameter 2 to be string, array given in /home/customer/www/chadbirt.com/public_html/wp-includes/class-wp-block-parser.php on line 417

Warning : strlen() expects parameter 1 to be string, array given in /home/customer/www/chadbirt.com/public_html/wp-includes/class-wp-block-parser.php on line 489

Hi @hugaud,

Would you mind sharing login credentials in a secure note so I can take a closer look at what’s happening here? I’ve seen it reported a few times but haven’t been able to reproduce the problem on a development site and still don’t have enough information on why it is happening.

@Rico, it sounds like when you updated not all the files were fully replaced. I would recommend fully deleting X and reinstalling it. That should get things working again.

@existentialella, if you wouldn’t mind sharing login credentials as well that would be helpful. You would just need to open a new topic so the Secure Note isn’t visible to this topic’s owner.

Hi Hugues,

Thanks for providing all your details.

Since there’s a new update of X theme which is 8.1.3 and cornerstone plugin 5.1.3, I went ahead and update your website then the issue is now resolved.

Hope that helps.

Thank you.

Thanks Marc,
I can see it in the changelogs, the devs have fixed it. I hadn’t been in to see there was an update.

  • Bugfix: Avoid PHP warnings in the class-wp-block-parser.php by ensuring only scalar values are passed intp wp_kses

Thanks for your help.
Hugues

You’re very welcome, Hugues!

FYI for Pro users I was on 4.1.2 new update fixed it…
Im getting 2 errors in Pro 4.1.2 - YES!!! 4.1.5 removed this off my front page…
Warning : preg_match() expects parameter 2 to be string, array given in /home/blablabla/public_html/wp-includes/class-wp-block-parser.php on line 417

Warning : strlen() expects parameter 1 to be string, array given in /home/blablabla/public_html/wp-includes/class-wp-block-parser.php on line 489

Thanks for the validation, Jason!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.