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

Ancestors/Children/Siblings/Subtree built in Query Type doesn't work with SearchService::findLocation

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 3.0.0-beta6
    • Fix Version/s: 3.0.0-beta6
    • Component/s: None
    • Labels:
      None

      Description

       Steps to reproduce

      Configure the following view for folder content type:

      content_view:
          full:
              folder:
                  controller: ez_query:locationQueryAction
                  template: full/folder.html.twig
                  match:
                      Identifier\ContentType: folder
                  params:
                      query:
                          query_type: 'Subtree'
                          parameters:
                              content: '@=content'
                          limit: 4
                          assign_results_to: items

       

      {% for item in items.searchHits %}
          <h2><a href={{ path('ez_urlalias', {'contentId': item.valueObject.contentInfo.id}) }}>{{ ez_content_name(item.valueObject.contentInfo) }}</a></h2>
      {% endfor %}
      

      Actual result

      The following exception is thrown:

      Argument 1 passed to eZ\Publish\Core\Repository\SiteAccessAware\SearchService::findLocations() must be an instance of eZ\Publish\API\Repository\Values\Content\LocationQuery, instance of eZ\Publish\API\Repository\Values\Content\Query given, called in /home/dominika/www/master/vendor/ezsystems/ezpublish-kernel/eZ/Publish/Core/MVC/Symfony/Controller/Content/QueryController.php on line 87
      

      Expected result

      It's works.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned Unassigned
              Reporter:
              adam.wojs@ibexa.co Adam Wójs
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: