Details
-
Bug
-
Resolution: Fixed
-
High
-
2015.01, 5.3.4, 5.4.1
-
None
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".