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

BaseDataAllCommand.collectNodes in wrong order

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 1.7.5, 2.0
    • 1.7
    • None

      Imagine you have a hierarchy like:

      item
        subnode
          subsubnode
      

      Calling "delete all" on the item let the method populate the nodes in the order reflecting the hierarchy in repository (subnode first, subsubnode second). Hence while looping over this collection, we call #executeNode() (aka node.delete()) for subnode first, which is still ok, but once it's about to #executeNode() upon subsubnode it ends up in InvalidItemStateException (attached) because the subsubnode has been removed already by the previous call.

      As a workaround one can still do just simple "delete" (hierarchical structure) instead of "delete all".

        Acceptance criteria

              jsimak Jaroslav Simak
              zdenekskodik Zdenek Skodik
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: