Cornerstone edit mode: Database

Hi,

I recently migrated my primary domain. All database entries have been modified to new domain url. The site works fine in the live view and Content Preview mode. But when I edit the page, the images seems to be pointing to the old image URL and hence appear to be missing in this view.

The live view shows images with the correct location to the new URL. Where is Cornerstone getting/storing the url for images? Any particular DB that I need to update? I have updated in Options, Posts and Posts meta tables.

Any help would be appreciated.

Just wanted to let you know that this issue is now solved via Facebook Group. Thanks to Roy Anger!

https://www.facebook.com/groups/xthemeusers/permalink/842456059264136/

Hi @dshakya,

Wow, really happy that our community also in facebook is doing great.

Feel free to ask us again and if it is okay to you, would you mind adding sharing us the complete solution here in the forum. It would be great for other that are not member of the facebook group.

Thanks.

Hi Support,

Here is what @royanger had to say and SOLVED IT -

When Cornerstone inserts an image into the page, the image tag includes a data attribute with the url. When you load Cornerstone, it loads from that instead of the src attribute. That data attribute, as well as other places in the DB use variations of the URL. IE, if the domain is https://example.com you might see the following and more (I found 7, if I recall):
https://example.com
https://example.com
https://example.com
//example.com
//example.com
And so on. You need to load the DB into a proper editor (Atom, Sublime, etc) and search for example.com (which is the OLD domain) and find all instances. For each one, run a search and replace to convert it to the new domain. Once done, (with caveats for backing up the site, etc) go to the ‘new’ site and drop all tables and import the edited database. If you go them all, it will work and things will be fixed.

Thanks for sharing.

Cheers!