Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-3856

Bootstrap website.xml is not possible

    XMLWordPrintable

Details

    • Improvement
    • Resolution: Won't Do
    • Neutral
    • None
    • 4.4.5
    • core
    • None

    Description

      I would like to be able to bootstrap website.xml. It is not possible now because of this sibling-test in BootstrapUtil.java

                          SiblingsHelper siblings = SiblingsHelper.of(node);
                          if(!siblings.isLast()){
                              nameOfNodeAfterTheImportedNode = siblings.next().getName();
                          }
      

      This throws

      Caused by: javax.jcr.ItemNotFoundException: Root node doesn't have a parent
         at org.apache.jackrabbit.core.NodeImpl$6.perform(NodeImpl.java:1712)
         at org.apache.jackrabbit.core.NodeImpl$6.perform(NodeImpl.java:1705)
         at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:200)
         at org.apache.jackrabbit.core.ItemImpl.perform(ItemImpl.java:91)
         at org.apache.jackrabbit.core.NodeImpl.getParent(NodeImpl.java:1705)
         at info.magnolia.cms.core.DefaultContent.getParent(DefaultContent.java:372)
         at info.magnolia.cms.util.SiblingsHelper.<init>(SiblingsHelper.java:101)
         at info.magnolia.cms.util.SiblingsHelper.of(SiblingsHelper.java:57)
      

      It looks like it should just work with the code afterwards.

      Checklists

        Acceptance criteria

        Attachments

          Activity

            People

              Unassigned Unassigned
              kimmo Kimmo Björnsson
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Checklists

                  Task DoD