Node type definition in the CRX package | Community
Skip to main content
Level 2
October 16, 2015
Solved

Node type definition in the CRX package

  • October 16, 2015
  • 3 replies
  • 1114 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by JustinEd3

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

3 replies

18Harry
Level 2
October 16, 2015

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

JustinEd3Adobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

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

mateusz_chromi1
October 16, 2015

Thanks a lot! This solves the issue