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

ezstarrating : fetch_by_starrating Query error (1054): Unknown column 'ezcontentobject.owner_id' in 'on clause'

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Medium Medium
    • None
    • 2013.1
    • None
    • debian 6, php 5.4, mysql5, ezcommunity 2013.1

    Description

      To reproduce, choose limitation on content/read policy : Group( Self )
      (or States limitation for example)

      When you use fetch_by_starrating with permission limitation, you have a SQL error :
      "Query error (1054): Unknown column 'ezcontentobject.owner_id' in 'on clause'. Query: SELECT
      ezcontentobject., ezcontentobject_tree.,
      ezstarrating.rating_average as rating, ezstarrating.rating_count as rating_count,
      ezcontentclass.serialized_name_list as class_serialized_name_list,
      ezcontentclass.identifier as class_identifier,
      ezcontentclass.is_container as is_container
      , ezcontentobject_name.name as name, ezcontentobject_name.real_translation

      FROM
      ezcontentobject_tree,
      ezcontentobject_tree owner_tree,
      ezcontentclass

      INNER JOIN ezcontentobject_name

      LEFT JOIN ezgroup_perm_tmp_890 ON ezgroup_perm_tmp_890.user_id = ezcontentobject.owner_id"

      For helping you, I have quickly changed the SQL query in ezsrRatingObject::fetchNodeByRating(), and pull a request on github : https://github.com/ezsystems/ezstarrating/pull/12

      Thanks.

      Attachments

        Activity

          People

            Unassigned Unassigned
            arnaudchasseux arnaudchasseux
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: