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

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • QA tracked issues
    • 4.5.0beta2
    • None
    • 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}
      

      Attachments

        Activity

          People

            dp@ez.no dp@ez.no
            jpingo jpingo
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: