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

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

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Neutral
    • Resolution: Fixed
    • Affects Version/s: 1.6.4, 1.7.1
    • Fix Version/s: 1.7.2
    • Patch included:
      Yes

      Description

      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.

        Attachments

          Activity

            People

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

              Dates

              Created:
              Updated:
              Resolved:
              Date of First Response:

                Time Tracking

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