London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!

Cant get a reference to a Block

Vote:
 

Hi,


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?

Thanks

#194562
Edited, Jun 25, 2018 15:14
Vote:
 

That is a known limitation. We are aware of this but it is not planned to fix in near future.

#194659
Jun 27, 2018 14:52
Vote:
 

Hi Quan,

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.

Thanks

#194663
Edited, Jun 27, 2018 16:10
Vote:
 

Was this ever adressed and fixed?

#337510
Mar 27, 2025 9:58
Vote:
 

For the record, we did try to fix this bug have to roll back because the looking for references is just too expensive. 

I did have a few ideas that might work as an add on but have never had time to try them 

#337516
Mar 27, 2025 10:35
Vote:
 

I was able to at least prevent block deletion using a Find query from the Moving Event.

Is it possible to edit the "not used" text? In Swedish it's set as: "Det här objektet används inte."

#337527
Edited, Mar 27, 2025 16:31
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.