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

contentNodeIterator - step attribute fails in some cases

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Neutral Neutral
    • None
    • 4.4.2
    • taglibs
    • eclipse, tomcat 6

      following code throws exception errors (please see attached file) when the amount of contentNodes cannot be divided by 4 (results in an integer)

      <cms:contentNodeIterator contentNodeCollectionName="contentCollection" step="4">
      <cms:includeTemplate/>
      </cms:contentNodeIterator>

      if the amount of nodes can be devided by 4, then iteration with step="4" works properly. otherwise it throws an nosuchelementexception. i assume this occurs because after the last iteration haschild() is true, but if there are only 1,2 or 3 nodes left contentNodeIterator is missing the 4th node. the example could be also done with 3 or 5,6,... and it gets more complicated if one uses the 'begin' and/or 'end' attribute as well.

        Acceptance criteria

              fgiust Fabrizio Giustina
              tobias Tobias Vollprecht
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD