Critical Error: Root Category Not Found

The system can not locate the root category / first page.


Resolution:
This error occurs if the data store did not return the very root category.

This can happen in the following situations:

1. No categories exist in the database for default language or category is invisible.
You will need to login to the commerce manager and add a new category or locate the existing category and set it to enabled/visible. The store must have atleast one category define for each language to function correctly.

2: There is already a category in the root and you can see it in commerce manager.
You need to make sure the default anonymous account has access to the very root category. To do that, open the commerce manager and locate the root category in the site manager. Check the checkbox next to it and click "access" button. The popup dialog will appear. Add "Everyone" role with a "read" permission and click save. Navigate back to the site. Please allow up to 5 minutes (depending on cache settings) for site to work.

3: The rights are assigned to everyone but the site still generates this error.
This can happen if the anonymous account has been removed from the system or its roles has been deleted. To readd the account to the Database you will need to run the following script:

DECLARE @RC int
DECLARE @CustomerId int
DECLARE @Email nvarchar(255)
DECLARE @CreatedDate datetime
DECLARE @LastEditDate datetime
DECLARE @Disabled bit
DECLARE @ShippingAddressId int
DECLARE @BillingAddressId int
DECLARE @PasswordHash varchar(40)
DECLARE @PasswordSalt varchar(10)
DECLARE @Contact bit

set @CreatedDate = GETDATE()
set @LastEditDate = GETDATE()
exec [dbo].[CustomerAccountInsert] @CustomerId OUTPUT, 'anonimous@yourcompany.com', @CreatedDate, 
@LastEditDate, 0, null, null, '6772DB388CD1050259B1A4876C874E04204F3ECC', 'yvuXNLg=', 0
INSERT INTO [dbo].[CustomerRole]([CustomerId], [RoleId]) VALUES(@CustomerId, 1)
INSERT INTO [dbo].[CustomerRole]([CustomerId], [RoleId]) VALUES(@CustomerId, 4)