Imported posts not editable in Cornerstone

I am having the exact issue described in this forum post:

I export my posts from site A using the WP exporter, and import import into site B with the WP importer. The Cornerstone data ends up as text in the edit page, just as shown in the above forum post.

However, in my case the version of X and the stacks of both sites are identical, so according to the final reply from @friech the export/import process should work.

I am not migrating an entire site, I just want the blog posts in this case. I understand that it’s possible to convert the blog posts into templates and then import this way, but in that case there doesn’t seem to be a bulk process to convert every post into a template.

Surely there has to be a way to do this?

Hello Michael,

Thanks for writing in! Even if you have the same or exact copy of the Cornerstone formatting codes when viewed in the text tab, it will still not editable because Cornerstone data resides in the post meta. When the exporting posts, WP Import/Export should not be used because it does not include all of the cornerstone data. It is recommended that when you export the posts, it is as if you are migrating your site. This is the most safest way of exporting/importing the posts/pages created in Cornerstone. That is why @Friech has mentioned this:

WordPress import/export system is not going to work, you need to 
go back to the originating blog site and save all your posts as 
cornerstone template (`.csl`) instead and upload it to your new blog site.

All of the saved templates can be managed in the template manager. Please check out this documentation about the template manager:

Thank you for your understanding.

Hi,

Thanks for your reply - I am reasonably familiar with templates and the template manager, but is there a bulk process for exporting a large number of posts? Without it, this becomes an impractical way of getting the posts over to another site.

Would a plugin that allows export/import of post meta work, like this one:

I would appreciate any help with this, as I am up against a deadline. Many thanks!

Hello Michael,

We cannot vouch for that 3rd party because we haven’t tested that yet. It is best that you do a site migration or use a plugin that import/expost the posts and it’s post meta or even the wp_tables so that the cornerstone data for each post will be intact.

Hope this helps.

Hi,

Many thanks for your reply.

As I understand it the plugin mentioned above does both of those things.

Obviously I appreciate that you cannot vouch for a plugin that is untested with the theme. But speaking theoretically, assuming the plugin does indeed do the things that you’ve suggested it would need to do, is it likely it would work?

Hello Michael,

As long as the post meta along with the cornerstone data information is imported and still in tack, you can edit the post back in Cornerstone. As you know, when you create a post or page in Cornerstone, most of the cornerstone element styling will be stored in the post meta as a cornerstone data. This is why when you edit your post/page in WordPress, you are seeing this:

[cs_content][cs_element_section _id="1" ][cs_element_layout_row _id="2" ]

These are only Cornerstone element’s formatting shortcode. All of the styling like color, margins, padding, etc were stored in the post meta as a cornerstone data. When the data is corrupted or missing (usually because of editing outside of Cornerstone or improper import), you can no longer edit it back in Cornerstone and just be seeing a blank canvas or blank page.

Hope this explains it briefly.

Hi,

Thanks for your reply, I have found a plugin which has a both a free and paid version, and I am fairly sure it has the functionality required to export the data correctly. When exporting, you can select all the post meta and custom fields, and you can even select whether the data is serialized or normal.

This is the lite version of the plugin, and I have it installed on “Site A” (www.andrewcohen.com) from which I need to export the posts. This is the plugin:

However, I need help with which fields to export, and which should be serialized. I am given many options, including the following examples:

_cornerstone_data	
_cornerstone_excerpt	
_cornerstone_settings	
_cornerstone_version	
_cs_generated_styles

_x_audio_embed	
_x_audio_mp3	
_x_audio_ogg	
_x_entry_alternate_index_title	
_x_entry_bg_image_full	
_x_entry_bg_image_full_duration	
_x_entry_bg_image_full_fade	
_x_entry_body_css_class	
_x_link_url	
_x_post_layout	
_x_quote_cite	
_x_quote_quote	
_x_video_aspect_ratio	
_x_video_embed	
_x_video_m4v	
_x_video_ogv

I am not sure which of the above should be included (I am guessing probably all) and which should be marked as serialized. There are also quite a few other fields:

_snippet
_subtitle
_thumbnail_id
_wp_desired_post_slug
_wp_old_date
_wp_old_slug
_wp_trash_meta_status
_wp_trash_meta_time
_yoast_wpseo_content_score
_yoast_wpseo_focuskw
_yoast_wpseo_focuskw_text_input
_yoast_wpseo_is_cornerstone
_yoast_wpseo_linkdex
_yoast_wpseo_metadesc
_yoast_wpseo_primary_category
_yoast_wpseo_title

Obviously it’s clear from the prefixes what most of these are but I’m not sure what to do with them, i.e. which I can ignore, which are essential, and which should be marked as serialized. There are also fields related to Essential Grid and The Grid which I assume can be ignored, as well as some prefixed with _oembed.

Any help with this would be seriously appreciated - even if you can just guide me on the Cornerstone fields and how to deal with them, that would be a great help.

Thanks again!

Hey Michael,

You will want to import _cornerstone_data. It is just important that you connect the postmeta to the post_id. That is why we strongly recommend that you migrate the whole site so you don’t make a mistake with this. To avoid issue, you’d also want to include the rest of _cornerstone_ and x` related data.

Please just note that whole or partial website migration is beyond the scope of our support. We will not support issues that will arise from export outside our recommendations. I understand that bulk export is a valid use case but there’s only a small percentage of users doing this. What I could do is submit a feature request so our development team will assess if users will need this feature generally and they’ll most probably add an official bulk import/export feature in that case.

Thanks.

Hi @christian

Many thanks for your reply and help with this.

I appreciate that website migration is beyond the scope of support. However, as you suggest, this is a somewhat different situation as it refers to a limitation of the theme with respect to bulk export. As the built-in Wordpress exporter does not work in this case, we have no simple way of copying over blog posts if they are created in Cornerstone.

It seems obvious to me that this is a situation that many people could face, and a bulk export feature would be extremely useful. I would definitely appreciate it if this could be submitted as a feature request.

In the meantime, I’m very grateful for any further help you can offer. The plugin I am testing has the option to mark data as “serialized” during the import process - should I do so, and if so would you suggest doing that with all the _x_ and _cornerstone_ data?

Thanks again!

Hey Michael,

I already have submitted this as a feature request after I replied.

I’m not sure what the plugin you said will do if you choose to serialize so please have the plugin support examine the data that the plugin will work on. A serialized data looks like this.

image

What’s important is, you copy the exact data to the destination site. Please contact the export plugin support for this. I believe that they will know what to do with their plugin judging by the screenshots I’ve shown you.

To be safe, copy all _x and _cornerstone data that’s attached to your posts.

I’m sorry but this is as far as we can go. If the plugin you said doesn’t help, please consider hiring a database expert, for now, to move data to your destination site.

Thank you for understanding.

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