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

Path attribute filter breaks when used with eZ Tags filter

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 5.4.5
    • Fix Version/s: 5.4.6
    • Component/s: Legacy stack
    • Labels:
      None
    • Environment:

      n/a

      Description

      The "path" attribute filter is useful for filtering out subtrees. However, it breaks with an SQL error when used with an eZ Tags extended attribute filter because eZ Tags also uses the "path_string" column name (ref: https://github.com/ezsystems/eztags/blob/master/sql/mysql/schema.sql#L7).

      Example fetch:

      print eZFunctionHandler::execute( 'content', 'tree_count', array( 'parent_node_id' => 2
      , 'limit' => 10
      , ,'attribute_filter' => array( array( 'path', 'not_like', $subtree_parent_node.path_string . '*' ) )
      , 'extended_attribute_filter' => array(
                  'id' => 'TagsAttributeFilter',
                  'params' => array(
                      'tag_id' => array( 25 ),
                      'include_synonyms' => true
                  )
              )
       ) );
      

      Error: "Ambiguous field name 'path_string' in SQL"

        Attachments

          Activity

            People

            Assignee:
            Unassigned
            Reporter:
            peterkeung Peter Keung
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: