ContentRepository does not throw exception when version cannot be deleted

Fixed in

EPiServer.CMS.Core 10.0.1


Aug 26, 2015


Oct 27, 2016


CMS Core


Closed, Fixed and tested


When we have more than one version of a content but none of the versions is published. Then ContentVersionRepository.Delete(contentReference) when contentReference is the first version created doesn't delete or give any feedback what happens.

The following description is taken from original bug description.

  1. EN and SV language are enabled for site. EN is master language
  2. Create Project 1 and Project 2
  3. Change site Language to EN> Create new Page 1
  4. Add page 1 in EN language to Project 1 >> The Primary draft version of page 1 in En *is added to Project 1
  5. Add page 1 in EN language to Project 2 > The dialog Show > Click on Create as new draft button > New draft version of Page 1 in En language is added to Project 2
  6. Keep site language in EN: Click to focus page 1 in page tree > Open Version gadget > Select Primary daft version in En language > Open gedget menu: Select Delete Version
  7. A dialog show message that confirm the deleting Version >> Click On Yes button

>>> See that the version is deleted ( no displayed on version list) but after that it is display on the version list >>> Version can not be deleted

Breaking changes
IContentVersionRepository.Delete method now throws an exception if a version cannot be deleted.