Warning: preg_match() in a component with parameters after updating from Pro 6.3.9 to 6.4.8

Hey,

After updating from Pro 6.3.9 to 6.4.8, I get the following warning on the frontend:

Warning : preg_match(): Unknown modifier ‘2’ in /var/www/vhosts/mydomain.com/wordpress/wp-content/themes/pro/cornerstone/includes/classes/Services/DynamicContent.php on line 108

To add some more clues, it is happening on a component with parameters. The site is on PHP version
8.1.27.

I am afraid I had to revert to a backup of the site so I cannot show you the warning –live–.

I think this is the same problem I reported a few weeks ago on this topic.

Thanks!

Hi Diego,

Thanks for reaching out.
We are still working on the warning and notices, till then request you add the following code into the wp-config.php to suppress the warning.

define( 'WP_DEBUG', false );

Please find the video that will help you to edit wp-config.php and add the above code: https://www.youtube.com/watch?v=3SDPTafEM8o

Hope it helps.
Thanks

Hi @tristup,

I already had 'WP_DEBUG' set to false. The warnings were being displayed because one of the plugins of the site had a bug and it was overriding the defined constants provided by WordPress Core so I had to add ini_set('display_errors','Off'); to the wp-config.php.

Thanks!

Hey Diego,

Can you let me know what image sizes you have? One of your sizes is causing this issue and we can try to fix the warning with this info. You can safely ignore this warning too. Thanks

image

Hey Charlie,

For post insertion in Cornerstone there are only 4 sizes, as follows:

Captura de pantalla 2024-01-18 a las 16.44.25

But for post insertion in the WordPress editor I get 12:

Captura de pantalla 2024-01-18 a las 16.42.53

And in the Simple Image Sizes (an old plugin I am planning to remove) settings I have –most of them are legacy sizes–:

Disabling Simple Image Sizes stops the warnings, even if I leave ini_set('display_errors','On').

Thanks!

1 Like

Hi Diego,

If deactivating the said plugin resolves the problem, I would suggest you contact the plugin author on this.

Thanks

Hi Tristup

The plugin seems to be abandoned and I do not need it anymore so I am going to delete it. I sent the image sizes thinking that Charlie may need them for debugging purposes. From my side, you can close this topic if you wish.

Thanks!

Thanks for the info, Diego.

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