Details
-
Bug
-
Resolution: Fixed
-
Medium
-
3.10.0, 3.9.4, 4.0.0
-
None
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}