Accidentally moved my home page to the drafts system folder. How-to move home back.

Permalink
I accidentally moved my home page to the drafts folder. See attached.

How can this be moved back?

1 Attachment

cgsmith
 
marmalade replied on at Permalink Reply
marmalade
How did you manage that? I didn't think you were able to delete the home page, when I try on a test site it gives me an error - and I can't move the home page in the site map to the trash...
cgsmith replied on at Permalink Reply
cgsmith
Goto sitemap -> Full Sitemap and check "Show System Pages" under options.

Then goto flatview sitemap and click home->Move/Copy and select drafts.

Running Concrete 5.5.1
adajad replied on at Permalink Reply
adajad
I don't know how you should be able to move the whole site back but there is, however, a column in the pages table in the db named cParentID, which should be 0 for Home. If you can't find any other way to solve it, you might try to change the parent ID for your home page.

Be aware though, that you might break your site completely if you mess too much in the db.

EDIT: I can't stop thinking about this, so if you wait a few hours I will set up a fresh install and give it a try. I just need to feed the kids and get them to bed first. Give me 3-4 hours.
cgsmith replied on at Permalink Reply
cgsmith
Adajad,

Thanks for your help. I have not tried your fix yet.

Lunch, then will try it.

I'll keep you updated.
adajad replied on at Permalink Reply
adajad
I just did a fresh install of C5 5.5.1 and did as you mentioned a few posts back to move Home to Drafts.

In my database it now said that my Home page (which is cID 1) had a cParentID of 97 (drafts). I updated the table and changed the cParentID back to 0 again (=no parent top level) and it all is back to normal.

UPDATE `database_name`.`pages` SET `cParentID`=0 WHERE `cID`='1';


Good luck!
cgsmith replied on at Permalink Reply
cgsmith
Thanks!

However, an editor published a change to the home page and now the whole site is saying "Not Found" except the home page.

Any idea on how to fix that?

Going to site.com/login or dashboard allows us to login but then just puts us back to the start without showing the dashboard
adajad replied on at Permalink Reply
adajad
Was the edit made while the Home page was in drafts or after the db change?

After you have logged in (site.com/login) can you reach the sitemap (site.com/index.php/dashboard/sitemap/full/)? If you do reach the sitemap, can you revert the published edit by clicking on the Home page and select Versions and go back?
cgsmith replied on at Permalink Reply
cgsmith
The change was made before the dB update.

After I login it goes to /!drafts/home/login which issues a page not found.

Then I try /dashboard/sitemap/full but it shows me the login page for the dashboard again.

I am thinking that the sessions are not setting properly?

Thank you for your help, this just happened to a live site.
adajad replied on at Permalink Reply
adajad
This seems like a caching issue, but I must say I'm running out of options here.

Was the site running ok while Home was under drafts? If that is the case you could try to move it back there via db, and go back a version or two. Then you can try and move Home back to top level again. You will loose the edits, but it might get you up and running again.

Hopefully someone more skilled than me might give some insight in this, but I understand your frustration and the need to have it fixed asap if this is on a live site.

As soon as you have it up (with or without the edits) I suggest running a backup. In fact, if you have a backup since before the Home to Draft thingy, you could go back to how the site was by a db restore (and files restore too if files have been added).
firepixel replied on at Permalink Reply
firepixel
I had to do this

UPDATE `db_name`.`Pages` SET `cIsActive` = '1',
`cParentID` = '0' WHERE `Pages`.`cID` =1;