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

ezflow's keyword block doesn't work in postgresql

    Details

      Description

      Adding a keyword block in ezflow generates a fatal error when publishing the frontpage.

      This is the sql that causes the problem

      /ezflow_site/content/edit/57/2/eng-GB
      Warning: PHP: E_WARNING  	Mar 26 2010 12:33:26
       
      pg_query() [<a href='function.pg-query'>function.pg-query</a>]: Query failed: ERROR:  for SELECT DISTINCT, ORDER BY expressions must appear in select list
      LINE 20: ...attribute_link.keyword_id = ezkeyword.id ORDER BY ezcontento...
                                                                    ^ in /var/www/apache2php52/ezppostgres/.run/lib/ezdb/classes/ezpostgresqldb.php on line 175
       
      Error: eZPostgreSQLDB 	Mar 26 2010 12:33:26
       
      Error: error executing query: SELECT DISTINCT  substring( ezkeyword.keyword from 1 for 7 )  AS keyword ,ezcontentobject_tree.node_id
                        FROM ezkeyword, ezkeyword_attribute_link,ezcontentobject_tree,ezcontentobject,ezcontentclass
                             , ezcontentobject_attribute a1
                             
                        WHERE
                         a1.version=ezcontentobject.current_version
                                                   AND a1.contentobject_id=ezcontentobject.id AND
                        ezkeyword.keyword LIKE 'failure%'
                        AND ezcontentobject_tree.is_invisible = 0
                        
                        AND ezkeyword.class_id IN ( 16 ) 
                        
                        AND ezcontentobject_tree.parent_node_id = '61'
                        AND ezcontentclass.version=0
                        AND ezcontentobject.status=1
                        AND ezcontentobject_tree.main_node_id=ezcontentobject_tree.node_id
                        AND ezcontentobject_tree.contentobject_id = ezcontentobject.id
                        AND ezcontentclass.id = ezcontentobject.contentclass_id
                        AND a1.id=ezkeyword_attribute_link.objectattribute_id
                        AND ezkeyword_attribute_link.keyword_id = ezkeyword.id ORDER BY ezcontentobject.published DESC
      LIMIT 5 ERROR:  for SELECT DISTINCT, ORDER BY expressions must appear in select list
      LINE 20: ...attribute_link.keyword_id = ezkeyword.id ORDER BY ezcontento...
                                                                    ^
       
      Error: eZDBInterface::commit TRANSID-3664dd84b57e45d67c7d656ff6d31562 	Mar 26 2010 12:33:26
       
      Transaction in progress failed due to DB error, transaction was rollbacked. Transaction ID is TRANSID-3664dd84b57e45d67c7d656ff6d31562.
      

      Steps to reproduce

      Test the keyword block
       
         1. Go to frontpage
         2. Edit fronpage
         3. In "Block type", select "Keyword"
         4. Click "Add block" button
         5. Move the new "Keyword" block to the top using drag&drop
         6. Edit the new block:
            Name : keyword test
            Source : "Conference" subtree
            Keywords : failure
            Classes : article
         7. Publish the frontpage and validate that the keyword block doesn't appear
         8. Edit the keyword block again : change source to be "Conference/News" node
         9. Verify that following field values are preserved:
            Keywords : failure
            Classes : article
        10. Publish the frontpage and validate that article2 and article4 are listed
      

      You might need to first also create some articles with some keywords (where "failure" is a keyword for at least one of them)

        Issue Links

          Activity

          Hide
          Vidar Langseid added a comment -

          FYI : I do not have ezfind installed

          Show
          Vidar Langseid added a comment - FYI : I do not have ezfind installed
          Hide
          Łukasz Serwatka added a comment -

          This problem is generic. It is not ezflow explicit. Problem is with content/keyword fetch function which ezflow block uses. It should be fixed in ezp kernel then.

          Show
          Łukasz Serwatka added a comment - This problem is generic. It is not ezflow explicit. Problem is with content/keyword fetch function which ezflow block uses. It should be fixed in ezp kernel then.
          Hide
          Chen Xiongjie added a comment -

          Fixed within 017673

          Show
          Chen Xiongjie added a comment - Fixed within 017673
          Hide
          Geir Arne Waaler added a comment -

          Reported as fixed. I move it to Closed.

          Geir Arne Waaler
          eZ Documentation

          Show
          Geir Arne Waaler added a comment - Reported as fixed. I move it to Closed. Geir Arne Waaler eZ Documentation

            People

            • Assignee:
              Chen Xiongjie
              Reporter:
              Vidar Langseid
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: