Cornerstone Error wp-content/plugins/cornerstone/includes/classes/components/class-shortcode-finder.php

Hi there,

Thanks for letting us know. We’re looking into what would be causing the warnings behind the scenes. For now, could you please go into wp-config.php and make sure that WP_DEBUG is set to false. It should look like this:

define( 'WP_DEBUG', false );

That will prevent the warnings from appearing for the time being, although we will still need to uncover why they are being triggered and fix it in a future point release.

I tried adding this (it didn’t already exist) in the wp-config.php file and nothing changed. Still getting the warning messages.

1 Like

I should add that I’m only seeing all these warnings on my posts. My regular webpages are fine.

My contact page was the only webpage showing the warnings until I removed the contact form from it and put it back in again in Cornerstone. Then it worked fine without warnings.

Same Problem after updating theme & all plugins. Removed and reinstalled and still same problem. I found that when deactivating Slider Revolution the errors go away. These errors don’t appear to be showing unless logged in as a admin…

1 Like

Good suggestion. I disabled Slider Revolution (which I updated earlier today) and my warnings all disappeared. I don’t use Slider Revolution anyway for my site so I guess it was fine to deactivate?

The warnings were showing up on my posts on different computers where I wasn’t logged in as administrator.

Hi @pinkzebra,

Please try to reinstall the Cornerstone, an easy way to do this would be making sure X is 7.1, then delete Cornerstone. You should get a prompt to install it again. It will install the latest version which will have that file.

Remember to clear all your caching features (plugin, server-side, CDN, and browser’s cache) after updating so that the code from the latest release is always in use. This will help you to avoid any potential errors.

Thanks,

Hi,

I am getting the same errors on the site below and have cleared all caches and reinstalled cornerstone.

The problem is related to Slider Revolution, disabling it makes the problem go away. Trouble is I am using it on the site’s homepage. This is also strange because I have another site which uses the slider and has the updates working without any issue.

Regards,

Pix

i have rollback to older verssion and wait till the problems with this version are fixed

Uninstalled and reinstalled Cornerstone and emptied caches. Still have same problem with warning messages. Deactivated Slider Revolution and warnings went away. My site functions great with Slider Revolution disabled.

Hi guys,

I’m currently checking this issue but I couldn’t reproduce this on my installation. This warning means the strpos first parameter isn’t a string, but an array.

if ( strpos($post_data, $shortcode) !== false ) {

But no matter what I did, existing or newly added page and with or without slider (as sample shortcode), the $post_data remains string and that’s from this line

$post_data = get_post_meta( $post_ID, '_cornerstone_data', true )

I like to further test and investigate this on your installation, would you mind providing your site’s URL, admin and FTP login credentials in the secure note of your separate thread? I would love to find the cause of this issue on your installations.

Thanks!

Happy for you to take a look on this site.

Getting same errors on fivestarglass.com, but go away once Slider Revolution is deactivated. Need to have SR active on the site, though. Any fixes or suggestions yet?

Hi Mark,

I removed the credentials you have provided, and make sure you changed them. Credentials should be posted only on your own thread for security reason.

I went ahead and fix the issues on your end, this weird because the same code is called on other pages but no warnings. And get_post_meta() should return string since the 3rd option is set to TRUE, but still some returns an array. And yes, it only happens when Revslider is active, but I can’t find if it’s modifying the get_post_meta() parameter to FALSE through hooks.

The bugfix for this should be available on next release, but you guys can also implement the bugfix manually by editing this file.

cornerstone\includes\classes\components\class-shortcode-finder.php

and add this code block

      if ( is_array($post_data) ) {//An array of data is very rare, we don't want to incorporate maybe_serialize() everytime
          $post_data = maybe_serialize ( $post_data );
      }

just above this line

$post_data = str_replace( '\"', '"', apply_filters('cs_read_post_data', $post_data, $post_ID ) );

Hope this helps.

Hi everyone,

Pro 3.0.2, X 7.0.2, and Cornerstone 4.0.2 are now live. These updates include Rad’s fix to prevent these warnings from happening with Revolution Slider.

Great, thank you! I’ll give it a try later tonight.

Sorted thanks :slight_smile:

You’re most welcome!

Update is work .fix my problem. Thanks

Glad to hear that, @kolyanich!

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