Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Getting error when loading Commerce Catalog

Vote:
 

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.

#195050
Edited, Jul 12, 2018 9:08
Vote:
 

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

#195051
Jul 12, 2018 9:13
Vote:
 

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

#195052
Jul 12, 2018 9:16
Vote:
 

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

#195053
Jul 12, 2018 9:25
Vote:
 

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.

#195054
Jul 12, 2018 9:50
Vote:
 

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

#196697
Sep 08, 2018 16:48
Vote:
 

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

#196698
Sep 08, 2018 17:16
Vote:
 

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 :-/

#196699
Sep 08, 2018 17:20
Vote:
 

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.

#198546
Oct 30, 2018 23:43
Vote:
 

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 

#198560
Oct 31, 2018 8:27
Vote:
 

Thanks Quan,
that helped me with the same issue.

#199172
Nov 19, 2018 11:26
Vote:
 

I am aware that this is an old thread, but it helped me with an issue with Commerce 14. After setting up the development environment, I got the same error that I couldn't access the catalog root. The problem was that for the migration job to run, you need to be a member of the "Administrators" group but the only group created on start is "WebAdmins" and therefore it fails to run the migration step Quan mentioned previously in this thread.

After creating the group "Administrators" and adding myself to that group, I was able to run the pending migrations by accessing the url https://localhost:xxxxx/EPiServer/Commerce/Migrate/index?autoMigrate=true.

#269998
Jan 14, 2022 13:30
Vote:
 

Thanks for writing your findings Christer Heinbäck!

I had the same issue on a fresh installation of Commerce 14 using the optimizely template for creating a fresh commerce project, and your solution fixed my issue as well.

#286173
Aug 26, 2022 8:21
Vote:
 

Thanks for your findings Christer Heinbäck!

I experienced the same problem with Commerce 14 and fixed it by doing as you suggested. Now I can access the commerce site and the problem has been fixed.

#288330
Sep 29, 2022 20:09
* 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.