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

    • Type: Bug
    • Status: Open
    • Priority: Medium
    • Resolution: Unresolved
    • Affects Version/s: 2013.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      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

            Assignee:
            Unassigned
            Reporter:
            arnaudchasseux Arnaud Chasseux
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated: