Unable to initialize preview. #cs-content missing

I had a page that was working fine. and then I made a CSS adjustment. And now it won’t load the page,and the console gives me this error.

Unable to initialize preview. #cs-content missing.

I cannot get the page to load back in now.
I removed ALL content, saved it. And then tried to reload the content with a blank setup, but didn’t work out still.

Thoughts?

I have tried the following:

  • Re-uploaded entire theme
  • Disabling plugins
  • Clearing all caching

Cannot solve this problem. Please help, I will post login information to take a peak.

Here is a link to the error on screen.

Hey there,

There exists two Pro themes in your site. Please remove one and also delete X for simplicity’s sake.

If that doesn’t fix the issue, switch to the parent Pro theme then check again. If that doesn’t help, please clear all caches, deactivate all third party plugins, remove customizations and if you’re using CDN, disconnect your site from it and give us cPanel access.

Thanks.

Hmm weird, I had previously done all of that, but I didn’t combo them I guess.
Seems to be an issue with my plugin wp-types (views).

Will take a closer look, sorry about that.

Thanks.

Actually, I thought I had it solved, it still seems to be an issue with trying to find #cs-content still.
I am not sure on how to debug this anymore.

Please login to see what you can see… please. At a loss on this.

I found another bug that seems to be popping up, and not sure if it is related.
If I have a page with some previous content, and then I try to click, “PRO”, it throws a ‘getPostData’ cannot read.

Please do this and we’ll continue to investigate.

Thanks.

HI,

Yes I have cleared all cache, disabled 3rd party plugins, and removed customization.
The thing is, there is a conflict it seems with a plugin called, WP-VIEWS.

Which everything is working fine, except for creating a NEW page, and Editing a specific page.
When I view the source code on the website, almost all pages have the #CS-CONTENT but some don’t.

Here is the cPanel Access.

The given credentials doesn’t work. I’ve deactivated all your third party plugins. Please keep it that way until this issue is resolved.

Please also completely uninstall WP Super Cache. Instruction can be found at https://wordpress.org/plugins/wp-super-cache/

Thanks.

Sorry about the credentials. ugh. Here is an updated version.

Because the Secure note is in MARKDOWN format, please include ** on the front and back of the PWD.

Hi There,

Regretfully the given credentials is still invalid.
Please see the image in the secure note.

By the way, I have checked your site and I noticed that you have recreated the Blank - Container | Header, Footer page template. Please make sure that you have inserted the correct codes based from the original code.

For template-blank-4.php file in wp-content/themes/x/

<?php

// =============================================================================
// TEMPLATE NAME: Blank - No Container | Header, Footer
// -----------------------------------------------------------------------------
// A blank page for creating unique layouts.
//
// Content is output based on which Stack has been selected in the Customizer.
// To view and/or edit the markup of your Stack's index, first go to "views"
// inside the "framework" subdirectory. Once inside, find your Stack's folder
// and look for a file called "template-blank-4.php," where you'll be able to
// find the appropriate output.
// =============================================================================

?>

<?php x_get_view( x_get_stack(), 'template', 'blank-4' ); ?>

For template-blank-4.php file in wp-content/themes/x/framework/views/integrity folder

<?php

// =============================================================================
// VIEWS/INTEGRITY/TEMPLATE-BLANK-4.PHP (No Container | Header, Footer)
// -----------------------------------------------------------------------------
// A blank page for creating unique layouts.
// =============================================================================

?>

<?php get_header(); ?>

  <div class="x-main full" role="main">

    <?php while ( have_posts() ) : the_post(); ?>

      <article id="post-<?php the_ID(); ?>" <?php post_class(); ?>>
        <?php x_get_view( 'global', '_content', 'the-content' ); ?>
      </article>

    <?php endwhile; ?>

  </div>

<?php get_footer(); ?>

If you may have taken the line that displays the content or may have any other custom template that modifies the page content area, then that would be the cause of your issue.

Please let us know how it goes.

Hmm. Yeah I noticed the extra template, which I don’t ever thought I created it. It’s been there for like years. ha.
All the templates look good to me.

I have attached a screenshot of the actual login settings. Please let me know if you find anything.

Hi there,

It’s because of Content Template, it’s above the Publish meta box when you edit your page (not in cornerstone). It’s set to Templates for Pages, I set it to none and cornerstone builder works again. To be specific, that Content Template is from your Toolset plugin.

Thanks.

1 Like

Very strange.
I thought perhaps maybe more with Cornerstone, because even when I created a new page, and tried to click “PRO” it would give me a javascript error.

Thanks again for helping me sort this issue out.

Hi there,

I’m not getting any javascript error when clicking the Pro tab in your site. Maybe it’s just cache on your end.

And you’re always welcome :wink:

Mind trying the test page?

https://www.rykon.ca/wp-admin/post.php?post=7613&action=edit

Hi there,

Yes, I’m able to confirm that. Have you tried disabling all the plugins and test it again?

You have existing data so I’m unable to do that, that process may remove some of your data so please backup your site before doing that. And once you have the backup, allow me to do the same troubleshooting :slight_smile:

Thanks!

Yeah, I just tested disabling ALL plugins and I got the same response, same error.

Hi, @stickypages,

After some researching on the generated HTML while trying to edit the page you mentioned (and some others) I noticed that a default javascript from Wordpress is not being loaded.

This error Uncaught TypeError: Cannot read property 'getPostData' of undefined error is related to /wp-includes/js/autosave.jsnot available.

This is what your site is loading:

<script type='text/javascript' src='https://www.rykon.ca/wp-admin/load-scripts.php?c=0&amp;load%5B%5D=jquery-core,jquery-migrate,utils,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-sortable,suggest,jquery-ui-resizable,&amp;load%5B%5D=jquery-ui-draggable,jquery-ui-button,jquery-ui-position,jquery-ui-dialog,jquery-ui-tabs,underscore,backbone,quicktags,shortcode,&amp;load%5B%5D=wp-a11y,wplink,jquery-ui-menu,jquery-ui-autocomplete,wp-util,plupload,jquery-ui-tooltip&amp;ver=4.8.2'></script>

This is from a plain Wordpress install:

<script type='text/javascript' src='http://wp.x5.dev/wp-admin/load-scripts.php?c=0&amp;load%5B%5D=hoverIntent,common,admin-bar,wp-ajax-response,jquery-color,wp-lists,jquery-ui-core,jquery-ui-widget,jquery-ui-mouse,jquery-ui-so&amp;load%5B%5D=rtable,postbox,heartbeat,autosave,quicktags,jquery-query,admin-comments,suggest,jquery-ui-position,jquery-ui-menu,wp-a11y,jquery&amp;load%5B%5D=-ui-autocomplete,tags-suggest,tags-box,underscore,word-count,post,editor-expand,thickbox,shortcode,backbone,wp-util,wp-backbone,&amp;load%5B%5D=media-models,wp-plupload,mediaelement,wp-mediaelement,media-views,media-editor,media-audiovideo,mce-view,imgareaselect,image-edi&amp;load%5B%5D=t,svg-painter,wp-auth-check,jquery-ui-draggable,jquery-ui-slider,jquery-touch-punch,iris,wp-color-picker,media-upload&amp;ver=4.8'></script>

As you can see, there are scripts missing, and we’re not considering all plugins that can inject more on the queue.

It’s hard to discover what is the root issue, but we can expect there’s some kind of corruption in the Wordpress install. To avoid getting this thread even larger and not helpful, I can suggest to you:

  • Create a full backup of your install, including database
  • Export pages
  • Locally or on a staging environment, create a fresh install of Wordpress
  • Install a fresh copy of Pro, copy your child theme and activate
  • Import pages
  • Try to edit
  • Install each plugin and test after configuring

At some point, the problem will pop up (or, if it’s actually a Wordpress install corruption, will not).

Please be welcome to share what you discover with us.

Thanks for your patience!