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

eZFind: Search may return nodes outside of chosen 'subtree_array'

    Details

      Description

      When a subtree_array is used for the search fetch function, in certain conditions the results include nodes outside of the chosen subtrees.

      Steps to reproduce:
      • Apply all eZ Find updates, including the fix from EZP-19673
      • create 2 folders: 'main', 'hidden'
      • create a 'Test' article inside 'main' folder, add a secondary location within 'hidden'
      • modify the search template to search on specific subtrees, add the location/node_id of the 'hidden' folder (but not the 'main' folder).
      • update search index using bin/php/updatesearchindex.php

      In the frontend, perform a search for 'Test'

      Expected Result:

      No results should be displayed, as the search is performed on the 'hidden' subtree.

      Actual Result:

      The 'main' location is returned.

      Additional details:

      The following message is logged when performing a search:

      [ Feb 06 2014 09:36:57 ] [127.0.0.1] eZSolr::getNodeID:
      Could not find a visible location for content #105 that current user has read access on. The Solr index is probably outdated
      

        Issue Links

          Activity

          Hide
          Joao Inacio (Inactive) added a comment - - edited
          Show
          Joao Inacio (Inactive) added a comment - - edited Possible fix: https://github.com/ezsystems/ezfind/pull/149
          Show
          Jérôme Vieilledent (Inactive) added a comment - Fixed in master: https://github.com/ezsystems/ezfind/commit/b3a5cefb617daff058da18e24b04d3fa9b966ae2
          Hide
          Paulo Nunes (Inactive) added a comment -

          After applying the fix on a ezp4.6 and ezp4.7, i have the following error when re-indexing:

          Starting object re-indexing
          PHP Parse error:  syntax error, unexpected '}' in /var/www/apache2php53/ezp47/.run/extension/ezfind/search/plugins/ezsolr/ezsolr.php on line 405
          PHP Stack trace:
          PHP   1. {main}() /var/www/apache2php53/ezp47/.run/extension/ezfind/bin/php/updatesearchindexsolr.php:0
          PHP   2. ezfUpdateSearchIndexSolr->run() /var/www/apache2php53/ezp47/.run/extension/ezfind/bin/php/updatesearchindexsolr.php:62
          PHP   3. ezfUpdateSearchIndexSolr->runMain() /var/www/apache2php53/ezp47/.run/extension/ezfind/bin/php/updatesearchindexsolr.php:157
          PHP   4. ezpAutoloader::autoload() /var/www/apache2php53/ezp47/.run/extension/ezfind/bin/php/updatesearchindexsolr.php:0
           
          Fatal error: eZ Publish did not finish its request
          The execution of eZ Publish was abruptly ended, the debug output is present below.

          No error information is present in var/log/error.log or in apache log.

          Regarding ezp5.0, 5.1, 5.2 and master, the patch seems to work and, using João example from description, no result is returned.
          But, despite no results are displayed, a user may be aware that one object exists because:

          • a message referring that "Search for "test" returned 1 matches" is displayed.
          • The content type, from the facets, says that "Article (1)"
          Show
          Paulo Nunes (Inactive) added a comment - After applying the fix on a ezp4.6 and ezp4.7, i have the following error when re-indexing: Starting object re-indexing PHP Parse error: syntax error, unexpected '}' in /var/www/apache2php53/ezp47/.run/extension/ezfind/search/plugins/ezsolr/ezsolr.php on line 405 PHP Stack trace: PHP 1. {main}() /var/www/apache2php53/ezp47/.run/extension/ezfind/bin/php/updatesearchindexsolr.php:0 PHP 2. ezfUpdateSearchIndexSolr->run() /var/www/apache2php53/ezp47/.run/extension/ezfind/bin/php/updatesearchindexsolr.php:62 PHP 3. ezfUpdateSearchIndexSolr->runMain() /var/www/apache2php53/ezp47/.run/extension/ezfind/bin/php/updatesearchindexsolr.php:157 PHP 4. ezpAutoloader::autoload() /var/www/apache2php53/ezp47/.run/extension/ezfind/bin/php/updatesearchindexsolr.php:0   Fatal error: eZ Publish did not finish its request The execution of eZ Publish was abruptly ended, the debug output is present below. No error information is present in var/log/error.log or in apache log. Regarding ezp5.0, 5.1, 5.2 and master, the patch seems to work and, using João example from description, no result is returned. But, despite no results are displayed, a user may be aware that one object exists because: a message referring that "Search for "test" returned 1 matches" is displayed. The content type, from the facets, says that "Article (1)"
          Hide
          Paulo Nunes (Inactive) added a comment -

          I'm having different results for ezp4.6 and ezp4.7. Both not the expected ones.

          eZ Publish 4.6
          Following the steps from the description, the search resulted in one result on "Hidden" folder (that is hidden). It should have returned nothing.
          I'm having this information in var/log/error.log

          [ Feb 18 2014 15:27:51 ] [192.168.2.103] eZSolr::getNodeID:
          Could not find a visible location for content #61 that current user has read access on. The Solr index is probably outdated

          eZPublish 4.7
          Following the steps from the description, the search resulted in one result on "Main" folder, as described in the description issue. It should also have returned nothing.
          I'm having this information in var/log/error.log (the same as in ezp 4.6)

          [ Feb 18 2014 14:57:17 ] [192.168.2.103] eZSolr::getNodeID:
          Could not find a visible location for content #61 that current user has read access on. The Solr index is probably outdated

          Notes for both 4.6 and 4.7:
          updatesearchindex has been executed before the presented results
          "Main" node id = 61 and "Hidden" node id=62
          "subtree_array, array( 62 )" was included in extension/ezfind/design/ezwebin/templates/content/search.tpl

          eZ Publish 5.0, 5.1 and 5.2
          Same remarks as last time, since the commit links haven't changed

          Show
          Paulo Nunes (Inactive) added a comment - I'm having different results for ezp4.6 and ezp4.7. Both not the expected ones. eZ Publish 4.6 Following the steps from the description, the search resulted in one result on "Hidden" folder (that is hidden). It should have returned nothing. I'm having this information in var/log/error.log [ Feb 18 2014 15:27:51 ] [192.168.2.103] eZSolr::getNodeID: Could not find a visible location for content #61 that current user has read access on. The Solr index is probably outdated eZPublish 4.7 Following the steps from the description, the search resulted in one result on "Main" folder, as described in the description issue. It should also have returned nothing. I'm having this information in var/log/error.log (the same as in ezp 4.6) [ Feb 18 2014 14:57:17 ] [192.168.2.103] eZSolr::getNodeID: Could not find a visible location for content #61 that current user has read access on. The Solr index is probably outdated Notes for both 4.6 and 4.7 : updatesearchindex has been executed before the presented results "Main" node id = 61 and "Hidden" node id=62 "subtree_array, array( 62 )" was included in extension/ezfind/design/ezwebin/templates/content/search.tpl eZ Publish 5.0, 5.1 and 5.2 Same remarks as last time, since the commit links haven't changed
          Hide
          Paulo Nunes (Inactive) added a comment -

          QA Approved
          Out of this issue scope, and therefore the approval scope as well, is:

          • a message referring that "Search for "test" returned 1 matches" is displayed.
          • The content type, from the facets, says that "Article (1)"
          Show
          Paulo Nunes (Inactive) added a comment - QA Approved Out of this issue scope, and therefore the approval scope as well, is: a message referring that "Search for "test" returned 1 matches" is displayed. The content type, from the facets, says that "Article (1)"

            People

            • Assignee:
              Unassigned
              Reporter:
              Joao Inacio (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day
                1d