Expand my Community achievements bar.

SOLVED

Node type definition in the CRX package

Avatar

Level 2

To meet the requirements I have implemented a custom nodetype that is placed inside the bundle within a package. The nodetype is used at the same time by a content that is also available in the same package.

The problem is, while installing the package for the very first time on the instance, the nodetype definition is missing in the registry as it hasn't been grabbed yet by JcrInstaller that takes care of bundles. Each subsequent installation is just fine as the nodetype definition is not being uninstalled by default.

What is the option to get out of this situation without splitting package into two i.e. bundle with nodetype definition and the rest?

1 Accepted Solution

Avatar

Correct answer by
Employee

Hi,

You should put your nodetype in the nodetypes.cnd file in the content package (in META-INF/vault). That way it will be created before the package's contents are installed.

Regards,

Justin

View solution in original post

3 Replies

Avatar

Level 2

Hi Mateusz,

You can alternatively modify the xml in your crx-quickstart folder to create your custom node type.

This might be located at crx-quickstart\repository\repository\nodetypes\ custom_nodetypes.xml . 

 

Note : This location might change according to the version of CQ you have.

 

Regards

Harish

Avatar

Correct answer by
Employee

Hi,

You should put your nodetype in the nodetypes.cnd file in the content package (in META-INF/vault). That way it will be created before the package's contents are installed.

Regards,

Justin

Avatar

Level 1

Thanks a lot! This solves the issue