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

Saving without nodeCollection fails

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • 3.0 Beta 1
    • 3.0 Beta 1
    • core
    • None
    • Win XP

      In info.magnolia.cms.gui.control.Save.getSaveNode(HierarchyManager hm, Content rootNode) is a check for the nodeCollectionName. The nodeCollectionName is a String which is initialized as StringUtils.EMPTY, but it is checked against null. If you want to save something directly in a page a org.apache.jackrabbit.name.MalformedPathException is thrown.

      Could you please change the code snippet in getSaveNode(HierarchyManager hm, Content rootNode)

      // get or create nodeCollection
      Content nodeCollection = null;
      if (this.getNodeCollectionName() != null) {

      to something like

      // get or create nodeCollection
      Content nodeCollection = null;
      if (this.getNodeCollectionName() != null && ! this.getNodeCollectionName().equals(StringUtils.EMPTY)) {

      thanks

      Ralf

        Acceptance criteria

              pbaerfuss Philipp Bärfuss
              ralf Ralf Hirning
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD

                    Estimated:
                    Original Estimate - 0.5h
                    0.5h
                    Remaining:
                    Remaining Estimate - 0.5h
                    0.5h
                    Logged:
                    Time Spent - Not Specified
                    Not Specified