definitions
mixin
properties
System Administrator
Jahia 7.3
Jahia 8
Legacy
Make a change in definition when content already exists
Question
The same mixin defined in several modules does not contain the same amount of properties.
The goal is to put a unique definition in a common module shared by the others without losing the content.
Answer
Here are the steps to achieve this goal without stopping the production :
- Put the cluster in read-only mode Read-only Mode http://localhost:8080/modules/tools/maintenance.jsp
- Undeploy from all cluster nodes the modules containing the definitions that should be moved/renamed. (To do that you will have to remove the dependency on the site for those modules from the processing node)
- You have to deploy on browsing/authoring nodes and then on the processing node the module containing the moved mixins.
- You then add a dependency in the old modules containing definitions whose are using those mixins.
- Stop the processing node and
DELETE
all lines fromJAHIA_NODETYPES_PROVIDER
table. - Restart the processing node and deploy the old modules with their new dependency.
- Restart each cluster node one by one.
Important :
- While the processing node is stopped, nothing must be deployed on the cluster.
- If the old and new definitions share the same properties names and types, all content should be accessible as before.