Uploaded image for project: 'Magnolia Data Module (closed)'
  1. Magnolia Data Module (closed)
  2. MGNLDATA-151

ItemTypes cannot be deleted when their "rootPath" is not on the top level

XMLWordPrintable

    • Yes

      If you have defined a data node type which has its root on level > 1 you'll get a NPE when trying to delete the item type.

      {{2012-05-05 07:04:18,637 ERROR fo.magnolia.module.data.commands.TypeDeleteCommand: cannot do delete
      java.lang.NullPointerException
      at info.magnolia.module.data.commands.TypeDeleteCommand.itemsExist(TypeDeleteCommand.java:119)}}

      This is caused by the use of (deprecated) .getChildByName() which of course does not work for something like "/customer/products".

      The attached patch uses ContentUtil.getContent(repository, path) instead and therefore also works with nested root nodes.

        Acceptance criteria

              mdivilek Milan Divilek
              will Will Scheidegger
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Created:
                Updated:
                Resolved:

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