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.
If you open the browser console and open the failed request in a new tab, what do you see there?
I see these errors:
Failed to load resource: the server responded with a status of 404 ()dojo.js:15 _317_498 @ dojo.js:15widgets.js:2 The store was queried with a [string] but the entity id is a [undefined]_e18 @ widgets.js:2
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
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.
We have the same problem (Commerce 11.8.2). Did you ever find a solution to this?
@Johan: this is most likely a site specific issue. You are very welcome to contact developer support service for further assistance
Thanks Quan. We've opened a ticket.
Found this goodie in the log:
2018-09-08 15:41:51,417  WARN EPiServer.Cms.Shell.UI.Rest.Internal.CmsContentContextResolver: Access denied. Failed loading content with content link: -1073741823__CatalogContentEPiServer.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 :-/
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.
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
Thanks Quan,that helped me with the same issue.
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.
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.
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.