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

Resolved Issue 18701 breaks range filters because of addcslashes...

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • None
    • 4.6.0
    • None
    • Operating System: Linux / Ubuntu 10.04 LTS
      PHP Version: 5.3.x
      Database and version: ezFind 2.3, 2.4, 2.5, 2.6, master
      Browser (and version): unrelated

    Description

      ForumPost with details, verification and debugging:
      http://share.ez.no/forums/extensions/ez-find/resolved-issue-187041-breaks-example-code-using-range-filters

      related ez-Issue:
      http://issues.ez.no/18701

      Git commit causing this issue:
      https://github.com/ezsystems/ezfind/commit/f454bd61bd179039a753d00ea6bf5009710119ea

      http://issues.ez.no/18701 solves an issue with url-encoding special characters in the request sent to the solr backend via URL-Get parameter.

      But the changes here https://github.com/ezsystems/ezfind/commit/f454bd61bd179039a753d00ea6bf5009710119ea break the filter-example using ranges in the ezfind documentation here: http://doc.ez.no/Extensions/eZ-Publish-extensions/eZ-Find/eZ-Find-2.6/Customization/Template-fetch-functions#eztoc126514_1_7 .

      Take this example-template-code from doc.ez.no:

       fetch( ezfind, search, hash( query, 'eZ Systems', 
                 filter, array( 'or',
                                     array( 'and',
                                              'article/body:hello',
                                             'article/rating:[1 TO 10]' ),
                                   array( 'and',
                                             'article/body:goodbye',
                                             'article/rating:[10 TO 20]' )))
      

      Together with the patched ezf-code this will generate the following URL:

       ... attr_rating_i:\[1+TO+10\] ...
      

      Which will cause this solr-exception:

       ... For input string: "[1"
      java.lang.NumberFormatException: For input string: "[1"
       ....
      
      Steps to reproduce

      Use ezFind 2.3, 2.4, 2.5, 2.6, master

      generate a filter query using ranges:

       fetch( ezfind, search, hash( query, 'eZ Systems', 
                 filter, array( 'article/rating:[1 TO 10]' ) ) )
      

      run this template/code, watch output / errorlog / solr-output for exceptions.

      Attachments

        Activity

          People

            jv@ez.no jv@ez.no
            croessler croessler
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: