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

keyword fetch function: some methods of sorting do not work

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Medium Medium
    • 3.10.0alpha1, 3.9.1
    • 3.8.6
    • Documentation, Misc
    • None
    • Operating System:
      PHP Version: (please be specific, like '4.4.3' or '5.1.5')
      Database and version: MySQL
      Browser (and version):

    Description

      According to http://ez.no/doc/ez_publish/technical_manual/3_8/reference/modules/content/fetch_functions/keyword and http://pubsvn.ez.no/nextgen/trunk/doc/features/3.8/enhanced_keyword_fetch_function.txt

      the keyword fetch function must support 6 sorting methods. In fact, the following two methods do not work:

      • name
      • class_name

      tested on 3.8stable rev.17936

      Steps to reproduce

      For default eZP 3.8 + shop_site package installation:
      1. Add an attribute of the "Keywords" datatype to your folder class (class ID = 1) and article class (class ID = 2)
      2. Create a couple of articles and folder containing "computer" as a keyword
      3. Use the following code in one of your templates:

      {def $list=fetch( 'content', 'keyword',
                        hash( alphabet, 'computer',
                            classid, array( 1, 2 ),
                            sort_by, array( 'name', false() ) ) )}
      
                  {foreach $list as $element}
                      {$element.link_object.name|wash} <br />
                  {/foreach}
                  {undef $list}
      

      You'll get an error.

      However, if you put for example "modified" instead of "name", it works

      Attachments

        Activity

          People

            vd vd
            sveta sveta
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: