Where is the Set As Homepage flag stored?

Topics: Administration, Troubleshooting
Oct 27, 2013 at 9:37 PM
Where is the "set as homepage" flag stored in the database?

We had a site outage caused by that flag becoming unset on the homepage, which in turn caused Orchard to throw a 404 error when the root URL was requested. It doesn't seem like this should be possible since you cannot turn the setting off when administering the current home page. It can only be toggled onto another page.

I am trying to determine how this happened using database backups, but I can't find the setting anywhere in the database.
Oct 28, 2013 at 4:32 AM
The home page is whatever is behind the / alias.
Marked as answer by durkc on 10/28/2013 at 10:23 AM
Oct 28, 2013 at 4:28 PM
Edited Oct 28, 2013 at 4:29 PM
[Orchard_Alias_AliasRecord] doesn't have any rows with a path of '/', yet the homepage flag is set. I found one with an empty path, is that it?
Oct 28, 2013 at 4:30 PM
You said that you were getting a 404 on /, so that's hardly surprising ;) Enable the Alias UI feature. It will give you a way to view and modify aliases.
Marked as answer by durkc on 10/28/2013 at 10:24 AM
Oct 28, 2013 at 5:23 PM
No, this is after I fixed it. Empty string must be how it represents the root path, because the content item id in RouteValues is the same as the one the Alias UI shows for '/'. Thanks for the tip about Alias UI, that was helpful.
Oct 28, 2013 at 6:04 PM
Ah yes, my bad.