Can't access Cornerstone after updating

Hello,

I just updated my Cornerstone from version 1.x.x to the latest version 4.2.3 — and now I can’t access Cornerstone at all. Once I try to click ‘Edit with Cornerstone’ button, I see this error on the white page:

And the link of the page becomes like this (perhaps it will be useful for you):

http://alextraum.ru/x/#/content/2

The example page I built with old Cornerstone is:

http://alextraum.ru/home/

Can you help me to fix this?

Thank you.

And not when I updated the X theme to the latest version, my site completely stopped working on the frontend :frowning: I don’t get what’s the problem because I updated everything the standard way, via clicking the links in the plugins or themes pages, like I always do.

So the admin panel is working, but when I try to open any pages of the site, the browser shows me this:

Any thoughts? I’m devastated :frowning:

I updated the Wordpress to version 5.1.5, but still my site isn’t working.

Hello Alex,

You can login through FTP then edit the wp-config.php file and find the line: define( 'WP_DEBUG', false );. Set it to true then save the file. Log back in the admin area and you should be able to see some more error information when you redo the steps you are having issues with.

If you are getting an error message that suggests: Fatal error: Allowed memory size of xxxxx bytes exhausted, it means that you need to have the PHP memory limit of your site increased.

To do this, please edit your wp-config.php file and insert these lines:

    define( 'WP_MEMORY_LIMIT', '256M' );
    define( 'WP_MAX_MEMORY_LIMIT', '512M' );

You can add it before the line
/*That's all, stop editing! Happy Blogging. */

Here is a details article about the PHP Memory Limit that is in our Knowledge Base:

In case the issue persists, please try to get in touch with your hosting provider and confirm to them that your PHP memory limit is increased.

If you are still having an issue, please provide us with the admin details of your site in a Secure Note so that we can check this further.

Hello Jade,

Thank you for such a detailed answer! I will do as you said and then update you on the results.

Have a great day!


Alex

Hi Alex,

Please feel free to let us know how it goes. :slight_smile:

Thank you!

Hello again Jade,

I see the debug output now and think you’re right, the problem is with the memory limit. However, I noticed there’s something about redirecting as well, so I’m putting the whole error message here:

Notice: Use of undefined constant ‘template_redirect’ - assumed ‘‘template_redirect’’ in /home/koolaevr/public_html/wp-content/themes/x-child/functions.php on line 38

Notice: Use of undefined constant ‘bwp_template_redirect’ - assumed ‘‘bwp_template_redirect’’ in /home/koolaevr/public_html/wp-content/themes/x-child/functions.php on line 38

Notice: Constant WP_MEMORY_LIMIT already defined in /home/koolaevr/public_html/wp-config.php on line 91

Notice: Constant WP_POST_REVISIONS already defined in /home/koolaevr/public_html/wp-config.php on line 92

Now, should I change the memory limit myself or through my hosting provider or perhaps I need to clear off those redirecting errors?

Thanks!


Alex

Hi Alex,

Lets go back track, this screenshot you show above, usually happen if you have an outdated version of Wordpress and updated the X and/or Cornerstone.

Wordpress version 5.1.5 is still three major updates behind which is not compatible with the latest version of X/Cornerstone. The latest version of Wordpress as of this writing is 5.4.1, please update to that version.

Updating WordPress

Another thing, you mentioned above you updated Cornerstone from version 1.x.x to the latest version 4.2.3, but you did not mention that you updated the X to the latest version, did you? The latest version of X is 7.2.3, please confirm what version of X you have. How to Update

This is an error to the customization you did on the child theme, please audit that customization and adhere to the latest version, else remove it. Unfortunately, since this is customization we won’t be able to provide support on this.

These errors mean you already have the WP_MEMORY_LIMIT and WP_POST_REVISIONS added somewhere, maybe you already have this on your wp-config.php file before.

Lastly, 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.

Hope it helps,
Cheers!

Hello,

Thanks for assisting me further!

Yes, I’ve updated the X theme to the latest 7.2.3 version. And I updated PHP to the 7 something version, then updated Wordpress to the latest version 5.4.1 and increased the memory limit like was recommended by your colleague above:

define('WP_MEMORY_LIMIT', '256M');
define( 'WP_MAX_MEMORY_LIMIT', '512M' );
define( 'WP_POST_REVISIONS', 7 );

I did have this limit set up in the wp-config.php file, though it was smaller.

Nevertheless, the debugging tool gives me this message:

**Notice** : Constant WP_MEMORY_LIMIT already defined in  **/home/koolaevr/public_html/wp-config.php**  on line  **91**

**Notice** : Constant WP_MAX_MEMORY_LIMIT already defined in  **/home/koolaevr/public_html/wp-config.php**  on line  **92**

**Notice** : Constant WP_POST_REVISIONS already defined in  **/home/koolaevr/public_html/wp-config.php**  on line  **93**

Is it okay or does it mean I should increase the limits even more?

As for the redirection errors on functions.php, I checked them and do believe those are the standard lines because I never did custom development on my site aside from tweaking some CSS and stuff via child theme’s CSS file.

So the functions.php file reads like this:

add_filter( 'x_entry_meta_comments_link', 'x_change_cmt_link' );
function x_change_cmt_link($link){
	include_once( ABSPATH . 'wp-admin/includes/plugin.php' );
	if ( is_plugin_active( 'disqus-comment-system/disqus.php' ) ) {
		global $post;
		return get_permalink( $post->ID ) . '/#disqus_thread';
	}
	return $link;
}

//Hide all usernames with this code to prevent hacking

add_action(‘template_redirect’, ‘bwp_template_redirect’);

function bwp_template_redirect()

{

  if (is_author())

  {

    wp_redirect( home_url() ); exit;

  }

}

And the error mentioned is with this line:

add_action(‘template_redirect’, ‘bwp_template_redirect’);

I think perhaps I’m using some old child theme and there were some changes in the X theme’s templates since then? Maybe that’s an issue?

Also, as I deactivated old WPML plugins and did everything I described above, I now can run the fresh Cornerstone just fine. There are still those debugging messages, now the question is what to do with them.

Thank you!


Alex

Hey Alex,

The notice in your wp-config means that you’ve added code several times. Delete the lines that are already defined. Please ask your web host if they can assist you with this because this is not a theme issue.

Regarding the child theme, the code you posted is not a part of our child theme. It’s a custom code you or an admin of your site added that to your child theme. Please delete that code if it’s causing problems.

To remove the notices from your site, disable debugging again as Jade instructed you to enable it previously.

Lastly, before reporting an issue, please check first if the issue is really caused by our theme and not by third-party factors. If you encounter problems with your site, please do the basic troubleshooting mentioned in our Common Issues article here: https://theme.co/docs/common-issues

Thanks.

Hello,

Thank you for assisting!


Alex

You’re welcome :slight_smile:

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