Index: src/main/java/info/magnolia/module/templatingkit/dam/dialog/DialogDAM.java =================================================================== --- src/main/java/info/magnolia/module/templatingkit/dam/dialog/DialogDAM.java (revision 40135) +++ src/main/java/info/magnolia/module/templatingkit/dam/dialog/DialogDAM.java (working copy) @@ -98,7 +98,7 @@ Content storageNode, Content configNode) throws RepositoryException { super.init(request, response, storageNode, configNode); - this.handlers = getDamSupport().getHandlers().values(); + setHandlers(); loadSubs(); } @@ -182,7 +182,7 @@ } } - private DAMSupport getDamSupport() { + protected DAMSupport getDamSupport() { try { Content websiteNode = this.getStorageNode(); if( websiteNode == null) { @@ -192,11 +192,30 @@ return STKUtil.getSite(websiteNode).getDamSupport(); } catch (Exception e) { //ignore + + //Should not be ignored -> is used in the init method will produce a null on 'this.handlers = getDamSupport().getHandlers().values();' + //I suggest to return always the default site definition's DamSupport config. } return null; } + protected void setHandlers() { + DAMSupport damSupport = getDamSupport(); + if(damSupport != null){ + this.handlers = getDamSupport().getHandlers().values(); + } + + } + + public Collection getHandlers() { + return handlers; + } + + public void setHandlers(Collection handlers) { + this.handlers = handlers; + } + private List