Getting error when loading Commerce Catalog


We are introducing Commerce in an already running CMS solution (version 11). 

As I want to deploy my CMS/Commerce changes to a test environment, I have exported relevant CMS pages. For the Commerce database I recreated it from the database script (EPiServer.Commerce.Core.sql). All works, except that when I go to the Commerce Catalog in test, I get this error:

Failed loading content with the url/uri: epi.cms.contentdata:///-1073741823__CatalogContent

I can choose Reload or Ignore in the error dialog, but no matter what I click it just cycles in the samme error message.

Do you know how I can get rid of this error message?

Commerce version is 11.8.3.

Edited, Jul 12, 2018 9:08

If you open the browser console and open the failed request in a new tab, what do you see there?

Jul 12, 2018 9:13

I see these errors:

Failed to load resource: the server responded with a status of 404 ()
dojo.js:15 _317
_498 @ dojo.js:15
widgets.js:2 The store was queried with a [string] but the entity id is a [undefined]
_e18 @ widgets.js:2

Jul 12, 2018 9:16

It is basically saying it can't find the catalog root, which is very strange because that is a virtual content. This can be tricky to figure out, I'd suggest you to contact developer support service

Jul 12, 2018 9:25

Strange thing is that if I import the catalog data via Commerce Manager, I can actually see the catalog tree in Commerce Manager. Just fails (with above mentioned error) when I go to Catalog plugin.

Jul 12, 2018 9:50

We have the same problem (Commerce 11.8.2). Did you ever find a solution to this?

Sep 08, 2018 16:48

@Johan: this is most likely a site specific issue. You are very welcome to contact developer support service for further assistance 

Sep 08, 2018 17:16

Thanks Quan. We've opened a ticket.

Found this goodie in the log:

2018-09-08 15:41:51,417 [21] WARN EPiServer.Cms.Shell.UI.Rest.Internal.CmsContentContextResolver: Access denied. Failed loading content with content link: -1073741823__CatalogContent
EPiServer.Core.AccessDeniedException: Access was denied to content -1073741823__CatalogContent. You do not have access to see the versions for this item.
at EPiServer.Cms.Shell.UI.Rest.Internal.CmsContentContextResolver.GetCommonDraft(ContentReference contentReference, String language, ContentLanguageInformation& languageInformation)
at EPiServer.Cms.Shell.UI.Rest.Internal.CmsContentContextResolver.TryResolveUri(Uri uri, ClientContextBase& instance)

What would you suggest we do? We don't do drafts in Commerce :-/

Sep 08, 2018 17:20

You probably received help by now but we had this today when replacing one commerce db with another one. It took some investigating but if you insert some values into [CatalogContentAccess] in the commerce database - objectid 1 (root), objecttypeid 3 (rootlink), name 'commerceadmins' or 'administrators' or similar and 1, 1 for role and mask you'll be ok.

Oct 30, 2018 23:43

That should have been done in "Set catalog root access rights" migration step. Not sure why you missed it, but if you do, you should run this code

            if (_contentLoader.TryGet(_referenceConverter.GetRootLink(), out IContent content))
                var securableContent = (IContentSecurable)content;
                var defaultAccessControlList = (IContentSecurityDescriptor)securableContent.GetContentSecurityDescriptor().CreateWritableClone();
                defaultAccessControlList.AddEntry(new AccessControlEntry(Security.RoleNames.CommerceAdmins, AccessLevel.FullAccess, SecurityEntityType.Role));
                defaultAccessControlList.AddEntry(new AccessControlEntry(EveryoneRole.RoleName, AccessLevel.Read, SecurityEntityType.Role));

                _contentSecurityRepository.Save(content.ContentLink, defaultAccessControlList, SecuritySaveType.Replace);

As always it's not recommended to access db directly 

Oct 31, 2018 8:27

Thanks Quan,
that helped me with the same issue.

Nov 19, 2018 11:26
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.