Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

{rate} {status:implemented|
Devstatus
Wiki Markup
Statusimplemented
Target
3.6
}

Solved

by

using

Solution C

Officialdocu
0Node types
1http://wiki.magnolia-cms.com/display/DOCS45/Node+types

Changing the node types

A) Change node type definition

The bad thing is that every node extends mgnl:content. But we need the mix:versionable only only on website pages and not on users, configuration, ...

B) Add mixins dynamically

Code Block
 C{status}
h1. Changing the node types

h2. A) Change node type definition

The bad thing is that every node extends mgnl:content. But we need the mix:versionable only only on website pages and not on users, configuration, ...

h2. B) Add mixins dynamically

{code}
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
{code}
h2. 

C)

...

Add

...

mixin

...

when

...

we

...

create

...

the

...

first

...

version (tick)

I add the mixin only in the mgnlVersion workspace. This is currently the only place we use it

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) keep mix:versionable for contentNode
C) remove all version related properties (tick)

Possible approaches

  • import, call update tasks, export
  • xml based cleanup code / script (tick)

Update

For that we must write some test