loading...

Checklist for the case of missing catalog entities in Content Editor

xirtardauq profile image Takumi Yamada Updated on ・2 min read

In Sitecore Commerce, catalog entities in the Commerce Engine database are displayed in Content Editor as an item. This behavior is implemented through the customized data provider.

Sometimes, especially after the installation of Commerce, all or some entities are missing in Content Editor.

Alt Text

When this happens, check the following information in your Sitecore.

Commerce Cache

When a data-related problem occurs, the "Refresh Commerce Cache" command may help you. Try executing this in the Commerce tab on the ribbon.

Alt Text

Selected Catalog field

To display entities in Content Editor, you need to configure which catalog is used in the Commerce Catalog Folder item. This item is in some location:

  • /sitecore/Commerce/Catalog Management/Catalogs
  • <Storefront>/Home/Catalogs

If no catalogs are selected in the Selected Catalogs field, its categories and sellable items aren't displayed.

Rechecking (uncheck and check) the selected catalog may be effective in some cases.

Alt Text

Status of Commerce Authoring

Catalog entities are from the Shared Environment database via the Commerce Authoring server. So that the server needs to be working properly. Confirm the server is started and no errors in the log file. You can find the log in the following location.

  • <Commerce Authoring>\wwwroot\logs\SCF.<Date>.log.<Random ID>.txt

An error I have encountered is Global.json (in Commerce Engine\wwwroot\bootstrap) has a non-escaped value in the SQL server name. This happens if you set the SQL server that has a backslash (like .\SQLEXPRESS) when installation.

Parent category/catalog of an entity

Category and SellableItem entities have a property that indicates their parent category or catalog. So make sure the ParentCatalogList and ParentCategoryList property of a missing item is properly set. You can get the properties by executing the following query in the Shared Environment database.

USE Commerce_SharedEnvironments

SELECT
    Id,
    EntityVersion,
    JSON_VALUE(Entity, '$.ParentCategoryList') AS ParentCategoryList,
    JSON_VALUE(Entity, '$.ParentCatalogList') AS ParentCatalogList
FROM
    sitecore_commerce_storage.CatalogEntities AS CatalogEntities
    INNER JOIN sitecore_commerce_storage.CatalogEntity AS CatalogEntity
        ON CatalogEntities.UniqueId = CatalogEntity.UniqueId
WHERE
    Id = 'an entity ID of your missing item'

If the missing entities are imported from external data storage like PIM, check your code of pipeline about importing sellable items or categories.

Conclusion

Almost cause is by a connection error to Authoring Engine or SQL databases, so you should check around there. If you find more causes, please tell me in a comment.

Discussion

pic
Editor guide