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

Sort by attribute (text) when using the 'ezfind'-'search' template function error

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Medium Medium
    • Resolution: Fixed
    • Affects Version/s: 4.5.0beta2
    • Fix Version/s: QA tracked issues
    • Labels:
      None
    • Environment:

      Operating System:
      PHP Version: (5.2.17')
      Database and version: Mysql
      Browser (and version): Firefox 3.6

      Description

      Creating a template override with an ezfind-search template function is not working,
      See attached images

      Steps to reproduce

      Setup - Add section

      1. Log in as admin in admin interface
      2. Click "Setup" in top menu
      3. Click "Sections" in left menu
      4. Click "New section" button
      5. Name : Find test
      6. Click "OK" button

      Setup - Create content : folder

      1. Click "Content structure" in top menu
      2. Select "Folder" in class drop down
      3. Click "Create here" button
      4. Enter form data:
      Name : News
      5. Click "Send for publishing" button
      6. Click "News" link

      Setup - Create content : aaaaaa

      1. Click "Create here" button
      2. Enter form data:
      Title : aaaaaa
      Intro : test
      3. Click "Send for publishing" button

      Setup - Create content : aa-ab

      1. Click "Create here" button
      2. Enter form data:
      Title : aa-bb
      Intro : test
      3. Click "Send for publishing" button

      Setup - Create content : aa-cc

      1. Click "Create here" button
      2. Enter form data:
      Title : aa-cc
      Intro : test
      3. Click "Send for publishing" button

      Setup - Create content : bbbbbb

      1. Click "Create here" button
      2. Enter form data:
      Title : bbbbbb
      Intro : test
      3. Click "Send for publishing" button

      Setup - Create content : ba-ab

      1. Click "Create here" button
      2. Enter form data:
      Title : ba-ab
      Intro : test
      3. Click "Send for publishing" button

      Setup - Create content : aa-bc hitch hicking is cool

      1. Click "Create here" button
      2. Enter form data:
      Title : aa-bc hitch hicking is cool
      Intro : test
      3. Click "Send for publishing" button

      Setup - Assign section to news folder

      1. Click "Setup" in top menu
      2. Click "Sections" in left menu
      3. Click "[+]" button in the "Find test" line
      4. Click checkbox next to "News"
      5. Click "Select" button

      Make override template

      1. Click "Design" in top menu
      2. Click "Templates" in left menu
      3. Click /node/view/full.tpl
      4. In Siteaccess drop down, choose : plain_site_admin
      5. Click "Set" button
      6. Click "New override" button
      7. Enter form data:
      Extension : No extension
      Filename : testfolder
      Class : Folder
      Section : Find test
      Base template on: View( without children )
      8. Click "OK" button
      9. Click "Edit" icon for the testarticle template
      10. At the bottom of the text area, enter the following code:

            <br/>search sorted by product name:<br/>
            {def $srch=fetch('ezfind', 'search', hash(
                       'query', '',
                       'limit', 20,
                       'subtree_array', array($node.node_id),
                       'class_id', 'article',
                       'sort_by', hash('article/title', 'asc')
                       ))}
       
            {foreach $srch.SearchResult as $s}
               {$s.name}<br />
            {/foreach}
      

      or the following code:

      <br/>search sorted by product name:<br/>
      {def $srch=fetch('ezfind', 'search', hash(
                 'query', '',
                 'limit', 20,
                 'subtree_array', array($node.node_id),
                 'class_id', 'article',
                 'filter', array('article/title:hitch'),
                 'sort_by', hash('article/title', 'asc')
                 ))}
       
      {foreach $srch.SearchResult as $s}
         {$s.name}<br />
      {/foreach}
      

        Activity

        Hide
        Damien Pobel (eZ) added a comment -

        I confirm this issue with the solr_3.1 branch.

        Show
        Damien Pobel (eZ) added a comment - I confirm this issue with the solr_3.1 branch.
        Hide
        Damien Pobel (eZ) added a comment -
        Show
        Damien Pobel (eZ) added a comment - In reply to comment #054162 Fixed in ezfind solr_3.1 branch https://github.com/ezsystems/ezfind/commit/0bfa51e
        Hide
        Damien Pobel (eZ) added a comment -

        The fix in solr_3.1 branch has been merged in master.

        Show
        Damien Pobel (eZ) added a comment - The fix in solr_3.1 branch has been merged in master.
        Hide
        Geir Arne Waaler added a comment -

        The issue is fixed so I move it from Code Review to Closed.

        Geir Arne Waaler
        eZ Documentation

        Show
        Geir Arne Waaler added a comment - The issue is fixed so I move it from Code Review to Closed. Geir Arne Waaler eZ Documentation

          People

          • Assignee:
            Damien Pobel (eZ)
            Reporter:
            João Pingo
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: