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

Link is wrong with non-main nodes using 'subtree_array'

    XMLWordPrintable

    Details

      Description

      When using eZ Find 'subtree_array' in a fetch, the returned results always point to their respective main parent nodes.Non-main nodes are not considered.

      Steps to reproduce:

      1. Create the following content structure:

      Article 1 (node_id: 158, main location)
      	Article 1.1
      Article 2 (node_id: 160)
      

      2. Add "Article 2" as a second location for "Article 1.1". "Article 1" is still the main location. You should have the following structure:

      Article 1 (node_id: 158, main location)
      	Article 1.1
      Article 2 (node_id: 160)
      	Article 1.1
      

      3. Search for "Article 1.1" in "Article 1" => OK, search result points to "Article-1/Article-1.1".

      Used this fetch on search.tpl template ('eng' frontend siteaccess):

      {set $search=fetch( ezfind,search,
                              hash( 'query', $search_text,
                                    'subtree_array', array(158) )
                                   )}
      

      Then went to "example.com/eng/content/search" and searched for "Article 1.1". Result - "Article 1.1" - points to "Article-1/Article-1.1", which is OK.

      4. Search for "Article 1.1" in "Article 2" => OK, search result points to "Article-2/Article-1.1".

      Used this fetch on search.tpl template ('eng' frontend siteaccess):

      {set $search=fetch( ezfind,search,
                              hash( 'query', $search_text,
                                    'subtree_array', array(160) )
                                   )}
      

      Then went to "example.com/eng/content/search" and searched for "Article 1.1". Result - "Article 1.1" - points to "Article-2/Article-1.1", which is OK.

      5. Change "Article 1.1" main location from "Article 1" to "Article 2":

      Article 1 (node_id: 158)
      	Article 1.1
      Article 2 (node_id: 160, main location)
      	Article 1.1
      

      6. Redo steps 3 and 4 => Incorrect, each search result now points to "Article-2/Article-1.1".

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              nuno.oliveira-obsolete@ez.no Nuno Oliveira (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: