Uploaded image for project: 'Content Editor'
  1. Content Editor
  2. CONTEDIT-596

The composition nodetype missing from custom_nodetypes

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 2.1.8
    • 2.1.7
    • None

      There can be cases where the composition nodetype goes missing. It should be possible to regenerate the nodetypes file without needing an installation/upgrade.

      Reproduce

      • Install Magnolia
      • Shut down
      • Delete the custom_nodetypes.xml file (/magnolia-dx-core-demo-6.2.39/apache-tomcat-9.0.80/webapps/magnoliaAuthor/repositories/magnolia/repository/nodetypes/custom_nodetypes.xml)
      • Start up

      Expected
      The mgnl:composition nodetype should be available.

      Actual
      The nodetype is missing which can lead to:

      NoSuchNodeTypeException: {http://www.magnolia.info/jcr/mgnl}composition
      

      Workaround
      Regsiter the nodetypes manually running this Groovy script:

      import info.magnolia.objectfactory.Components;
      import info.magnolia.repository.Provider;
      import info.magnolia.repository.RepositoryManager;
      
      RepositoryManager repositoryManager = Components.getComponent(RepositoryManager.class);
      Provider repositoryProvider = repositoryManager.getRepositoryProvider("magnolia");
      repositoryProvider.registerNodeTypes("/mgnl-nodetypes/content-editor-nodetypes.cnd"); 
      

      Notes
      The problems stems from the fact the nodetype is only registered through code now. We need the nodetype registered through a file configuration as well.

        Acceptance criteria

              thuy.to Thuy To
              rgange Richard Gange
              AuthorX
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved:
                Work Started:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 1d 7.5h
                    1d 7.5h