If you have the following setup on the Episerver Commerce (currently using Version: 9.13): Variation Content -> Content Area -> Block.
When you're trying to publish the Block (or even delete it) there's aparently no way Episerver to know if that Block is being referenced anywhere.
The following options were tested: - Getting a SoftLink to that Block using the method Load from the IContentSoftLinkRepository.- Getting the References to that Block using the method GetReferencesToContent from the IContentRepository.
Is this a bug or am I doing something wrong?
That is a known limitation. We are aware of this but it is not planned to fix in near future.
We need to know when to invalidate the product and so when the content is updated we need to invalidate the cache on the variant.
I am happy to take any other work-arounds from the team but I am not sure there are any.