Changing the node types
A) Change node type definition
B) Add mixins dynamically
Index: /Users/philipp/checkout/magnolia/magnolia-core/src/main/java/info/magnolia/cms/core/DefaultContent.java =================================================================== --- /Users/philipp/checkout/magnolia/magnolia-core/src/main/java/info/magnolia/cms/core/DefaultContent.java (revision 14777) +++ /Users/philipp/checkout/magnolia/magnolia-core/src/main/java/info/magnolia/cms/core/DefaultContent.java (working copy) @@ -168,7 +168,12 @@ this.setRootNode(rootNode); this.node = this.rootNode.addNode(this.path, contentType); this.setAccessManager(manager); - this.addMixin(ItemType.MIX_VERSIONABLE); + if(this.getItemType().equals(ItemType.CONTENT)){ + this.addMixin(ItemType.MIX_VERSIONABLE); + } + else{ + this.addMixin(ItemType.MIX_REFERENCEABLE); + } // add mix:lockable as default for all nodes created using this manager // for version 3.5 we cannot change node type definitions because of compatibility reasons // MAGNOLIA-1518
Bootstrapfiles
We have to clean up the bootstrap files. Depending on solution A or B we have to clean the files differently:
A) remove all version related properties
B) same as A but keep mix:versionable
Possible approaches
- import, call update tasks, export
- xml based cleanup code / script
Update
In the worst case we have to use export import. Otherwise it is not possible to change the primary type
Overview
Content Tools