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

Fetch reverse_related_objects sql error

    XMLWordPrintable

Details

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Critical Critical
    • None
    • 2013.1, 2013.4, 5.1
    • None

    Description

      If I use this simple fetch function under full view:

      {def $related_solution = fetch( 'content', 'reverse_related_objects', hash( 'object_id', $node.contentobject_id, 'attribute_identifier', '428' ) )}

      I get a sql error:

      Query error (1064): You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'AND contentclassattribute_id=428 ( relation_type & 8 ) <> 0
      ' at line 19. Query: SELECT
      ezcontentclass.serialized_name_list AS class_serialized_name_list,
      ezcontentclass.identifier as contentclass_identifier,
      ezcontentclass.is_container as is_container,
      ezcontentobject.*, ezcontentobject_name.name as name, ezcontentobject_name.real_translation

      FROM
      ezcontentclass,
      ezcontentobject,
      ezcontentobject_link,
      ezcontentobject_name

      WHERE
      ezcontentclass.id=ezcontentobject.contentclass_id AND
      ezcontentclass.version=0 AND
      ezcontentobject.status=1 AND

      AND contentclassattribute_id=428 ( relation_type & 8 ) <> 0
      AND ezcontentobject.id=ezcontentobject_link.from_contentobject_id AND
      ezcontentobject_link.to_contentobject_id=265 AND
      ezcontentobject_link.from_contentobject_version=ezcontentobject.current_version
      AND
      ezcontentobject.id = ezcontentobject_name.contentobject_id AND
      ezcontentobject.current_version = ezcontentobject_name.content_version AND

      ( ezcontentobject_name.language_id & ezcontentobject.language_mask > 0 AND
      ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 1 )
      + ( ( ( ezcontentobject.language_mask - ( ezcontentobject.language_mask & ezcontentobject_name.language_id ) ) & 2 ) )
      <
      ( ezcontentobject_name.language_id & 1 )
      + ( ( ezcontentobject_name.language_id & 2 ) )
      )

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours
                3h