Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-12640

depth_operator does not work properly when fetching tree counts

    XMLWordPrintable

Details

    Description

      The code in eZContentObjectTreeNode differs between fetching sub trees and fetching the sub tree count, in that way that the values gt, ge, lt will not work correctly when fetching sub tree counts when fetching with one parent node. Only eq and le work, and by default le is used when a depth is specified. When fetching the count from more than one parent node, eq will be always used.

      Example code to check:

      {let $count=fetch('content','tree_count',hash('parent_node_id',2,'depth',2,'depth_operator','gt'))
           $nodes=fetch('content','tree',hash('parent_node_id',2,'depth',2,'depth_operator','gt'))}
      Subtree count depth greater than 2: {$count}<br />
      Count of nodes fetched with the same conditions: {$nodes|count}
      {/let}
      

      Attachments

        Activity

          People

            cyberwolf cyberwolf
            cyberwolf cyberwolf
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: