cnd extend

Overriding components


The customer has overridden two components of the Jahia Twitter 2.0.2 in his own module.
This solution was working before DF 7.x and OSGI bundle concept.
But this one no longer works as only the Jahia Twitter 2.0.2 is used.


The cause of the issue is the following one:

  1. The Jahia Twitter 2.0.2 module is active as the jnt:twitterWidget component is needed.
  2. The custome's module does not use the jnt:twitterWidget component but overrides the jnt:twitterFeed and jnt:twitterSearch by adding the jmix:socialComponent mixin.


To extend the node type via the extends directive in the definitions.cnd file.

Based on this example, the solution be this one:

[jmix:MysocialComponent] > jmix:socialComponent mixin

[jmix:MysocialComponent] > jmix:socialComponent mixin

For the existant jnt:twitterSearch and jnt:twitterFeed I suggest to use a simple script to add the mixin types like:

JCRNodeIteratorWrapper ni = session.getWorkspace().getQueryManager().createQuery("select * from [jnt:twitterSearch]", Query.JCR_SQL2).execute().getNodes();

while (ni.hasNext()) {
    JCRNodeWrapper next = (JCRNodeWrapper);
    if (!next.isNodeType("jmix:socialComponent")) {

This script should be executed in live and default workspace. And also for the type jnt:twitterFeed