2 Replies Latest reply on Apr 25, 2013 9:23 AM by Clookes

    CQ doesn't pick up nodetypes.cnd changes using Package Manager

    Clookes Level 1

      Hi,

       

      CQ doesn't seem to pick up the changes in custom nodetype definitions in nodetypes.cnd when I install the package containing the updated nodetypes.cnd using Package Manager, how do I get around this?

       

      Steps

      1) fire up a fresh installation of CQ

      2) In Package Manager, upload a CQ package containing custom nodetypes.cnd

      3) check that the custom nodetypes are registered in Node Type Administration console

      4) change nodetypes.cnd by adding a new property in a custom nodetype inside nodetypes.cnd file

      5) make a new package with updated nodetypes.cnd file

      6) In Package Manager, upload the new CQ package and install

      7) check that the new property has been added in Node Type Administration console <-- ***FAIL***

       

       

      Thanks!

        • 1. Re: CQ doesn't pick up nodetypes.cnd changes using Package Manager
          aklimets Adobe Employee

          You can only install new node types this way - but you cannot change existing node types with cnd files in a package. The package manager simply skips all existing namespace & node types in a cnd file.

           

          This is because updating an existing node type might fail, depending on whether it is used in content and the change is conflicting. It's a schema change and that can be non-trivial. Therefore package manager does not try to tackle this at all.

           

          You can use this tool that guides through the process: http://localhost:4502/libs/cq/compat/components/ntupgrade.html

           

          You can do it yourself programmatically using the JCR API - take a look at the implementation of the above tool: /libs/cq/compat/components/ntupgrade/ntupgrade.jsp

           

          But only do this during development - you should not plan for schema updates to production systems. In general, you want to minimize the use of schemas / node types with JCR. Use nt:unstructured, cq:Page, sling:Folder and co, and use properties (mostly sling:resourceType) to mark types. These can be much easier migrated.

           

          HTH,

          Alex

          • 2. Re: CQ doesn't pick up nodetypes.cnd changes using Package Manager
            Clookes Level 1

            Thank you, that was very helpful.  I'll just stick with nt:unstructued.