Fatal error: Cannot declare class Cornerstone Shortcode Preserver

Hi! When I updated my website today at metalcraftersinc.com, my site crashed. My hosting company provided me this information (see below). What, if anything, could/should be done to correct this problem so we don’t run into again? I think the only way we got around it this time was to Restore the site from the previous day. Please let me know what we should do? Thanks!

Here is the error from the logs.mm[22-Sep-2021 18:00:02 UTC] PHP Fatal error: Cannot declare class Cornerstone_Shortcode_Preserver, because the name is already in use in /home/metalcra/public_html/wp-content/themes/pro/cornerstone/includes/classes/classic/utility/class-shortcode-preserver.php on line 8.

Hello @Jen6566,

Thanks for writing in!

This could happen if the previous version wasn’t fully deleted during the update process. I would recommend using the WordPress theme uploader to install Pro again. It will prompt you to replace the existing version. This should get things up and running again.

You may also do the following:

  • Ensure that you are fully up to date. WordPress, Theme, and Cornerstone (Version Compatibility)
  • Also make sure the PHP version is 7.4 or higher (WordPress recommends)
  • 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.

If the issue persists, please create your own thread and provide us login credentials in there in a “Secure Note” so we can take a closer look. You can create a secure note in your next reply with the following info:
– Link to your site
– WP login URL
– WP username
– WP password
– WP Administrator Role
- Confirmation that we can access and make changes to your site

To know how to create a secure note, please check this out: How The Forum Works

Thanks,

Hi there! I actually do see two instances of PRO installed on my staging site when I go to the WP Appearances–Themes menu. When I go to delete the older 4.3.2 version, it says “Deletion failed: The requested theme does not exist.”

You recommended installing the theme, but I’ve already got it in there twice (plus the child). Is uploading and installing it again still the best approach or should I go in through file manager to delete the extra, older copy of the theme? PLMK _ thanks! :slight_smile:

Hi @Jen6566,

I would recommend fully deleting the Pro theme and reinstalling it. A good way to do this would be:

  • Go to your file manager/ or use FTP
  • locate this path wp-content/themes and delete the two Pro themes except for the child theme
  • Then go to your themeco dashboard and download the latest version of Pro
  • Upload and activate it on your website

Hope that helps.

Ok, I’ll try that next. What’s odd is that my live site seems to be functioning (outwardly anyway). So I’ve been cloning a copy of my live site onto a staging site for testing, and the clone seems to succeed, but if I click past the homepage, I just get an error screen.

Anyway, I’m going to try what you suggest on staging first. But if it works there, I can only hope it will work on the live site because even though I just re-cloned my live-site onto my staging domain, the 2 sites don’t function the same even now. Back shortly - thanks! :slight_smile:

Hi @Jen6566,

Great and let us know how it goes.

Thank you.

Hi! Hmm… Well, I’m not sure what’s going on. I removed the outdated copy of PRO that was still installed. And then I installed a fresh download of the theme and everything appears ok. But whenever I go to clone my site onto staging subdomain where I can test plugin updates, etc., I can’t get a staging site to work. Every time I copy the site, it adds a file folder call pro-child-bad. I’ve tried simply deleting the directory via File Manager, but that doesn’t fix it. And I cannot get to a WP login screen, so I’m not able to renstall the theme.

I’m just worrried that every time I need to make updates, I’m going to keep running into this. And I can’t have that. What do I do next? I’ve opened at ticket w/ Peopleshost.com, too. But let me know? I’m not sure where the problem is stemming from… Thanks! :slight_smile:

Hello @Jen6566,

I would suggest you please have a look at this article to learn more about how to move the live site to the staging server.

In case if it doesn’t work for you please contact your hosting provider for this since it looks like server related issue.

Thanks for understanding

whoops, our messages just crossed paths. Ok, I’ll pass this info along to my host and see what they can do. It’s just odd because I’ve created staging sites with ManageWP for a few years now - and I only work w/ PRO for a theme. It’s odd that the problem is isolated to this one website and not all my others. Let’s see what the host says - thanks!

HI @Jen6566,

Great then! Please let us know if it works for you.

Thank you.

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