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

Searching with API using a Field criterion leads to a fatal error

    Details

      Description

      When trying to search for content based on the Field criterion, I get the following exception:

      PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column '' in 'where clause'
      

      The code used is the following:

      $criteria = array(
          new ContentTypeIdentifier( 'test' ),
          new Field( 'title', '=', 'foo' )
      );
      $query = new Query(
          array(
               'criterion' => new Query\Criterion\LogicalAnd( $criteria )
          )
      );
      $result = $this->getRepository()->getSearchService()->findContent( $query ) );
      

      In eZDemo, searching against title fields will match an ezinisetting field type, which uses the Null converter (not indexable of course)

        Issue Links

          Activity

          Hide
          Jérôme Vieilledent (Inactive) added a comment -

          The problem comes from the legacy Field CriterionHandler not taking into account fields that are not indexable (converter having getIndexColumn() returning false).

          Show
          Jérôme Vieilledent (Inactive) added a comment - The problem comes from the legacy Field CriterionHandler not taking into account fields that are not indexable (converter having getIndexColumn() returning false ).
          Show
          Jérôme Vieilledent (Inactive) added a comment - Related forum discussion: http://share.ez.no/forums/ez-publish-5-platform/issues-searching-for-content-by-field-value
          Show
          Jérôme Vieilledent (Inactive) added a comment - Pull-request: https://github.com/ezsystems/ezpublish-kernel/pull/320
          Show
          Jérôme Vieilledent (Inactive) added a comment - Fixed in master : https://github.com/ezsystems/ezpublish-kernel/commit/6f12ebabe4c13e61e4576e7b62807287481196be
          Hide
          Pedro Resende (Inactive) added a comment -

          This story is blocked by https://jira.ez.no/browse/EZP-20848

          Show
          Pedro Resende (Inactive) added a comment - This story is blocked by https://jira.ez.no/browse/EZP-20848

            People

            • Assignee:
              Unassigned
              Reporter:
              Jérôme Vieilledent (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              2 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 - 6 hours, 30 minutes
                6h 30m