Track IList<ContentReference> in Commerce - warning before deleting content
While being within Commerce and trying to remove a block that is used you don't get a proper warning. One can use flag EnableFeatureGetReferencesInCatalog which replaces ReferencedContentResolver with CommerceReferencedContentResolver.
It looks like there is a bug/missing functionality in this class.
While it works fine when a block is used within ContentArea, it does not work when a block is used within IList<ContentReference>
Steps to reproduce:
0. Make sure you have EnableFeatureGetReferencesInCatalog set to true
1. Add a field of type IList<ContentReference> in Commerce context (ie on Product page
2. Create a new block and add it to newly created field
3. Try to remove the block
What will happen is that you will get a popup saying that this block is not used anywhere and it's safe to remove it (which is false
As a contradiction, try to do the same in CMS page and you will get a proper warning saying that this block is used.
I would expect the same behavior in CMS and in Commerce
