This scriptÂ
count = 0 Repository.query("//element(*, ametys:defaultContent)[ametys-internal:contentType='org.ametys.test.Content.exhaustif']").forEach(function(content) { Content.delete(content, {force:true}) count++ }); session.save() print(count)
fails with error
class org.ametys.web.repository.content.jcr.ModifiableDefaultWebContent cannot be cast to class org.ametys.cms.repository.ModifiableDefaultContent (org.ametys.web.repository.content.jcr.ModifiableDefaultWebContent and org.ametys.cms.repository.ModifiableDefaultContent are in unnamed module of loader