Try our conversational search powered by Generative AI!

Issue with circular reference for catalog content

Found in

EPiServer.Commerce 12.3.1

Fixed in

EPiServer.Commerce 12.5.0

(Or a related package)

Created

Jul 06, 2018

Updated

Jul 30, 2018

Area

Core

State

Closed, Fixed and tested


Description

Steps to reproduce

  1. Add the below code to FashionProduct.

    [UIHint(UIHint.CatalogContent)]
    [Display(Name = "Test product", Description = "Test product", Order = 2090)] 
    [AllowedTypes(typeof(FashionProduct ))] 
    public virtual ContentReference TestProduct { get; set; }
    

  2. From product A, link to product B.
  3. From product B, link to product A using the above property.
  4. Publish both of them.

Expected:
No problems.

Actual:
When trying to load A or B, there is an entry in the log:

EPiServer.Commerce.Catalog.Provider.MetaDataPropertyMapper - Failed to map meta field value '~/link/90eeab82c62b4ba9a5e27ba24029b124.aspx' to a ContentReference. Error: Deadlock risk detected. Trying to read a page from the same thread that is already trying to read the same page.