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

Pagination in QueryFieldtype doesn't display results after the 1 page

    XMLWordPrintable

Details

    Description

      When trying to use the query fieldtype to display children of an item the pagination does not work - trying to display the second result page results in a permission error, even when the user performing the action is "admin"

       

      IMPORTANT: Use APP_ENV=prod and APP_DEBUG=0

      Setup:

      In config/packages/ezplatform.yaml:

      ezplatform:
          system:
              default:
                  content_view:
                      line:
                          images:
                              match:
                                  Identifier\ContentType: "image"
                              template: "@ezdesign/content/view/line/image.html.twig"

      Create a file: templates/themes/standard/content/view/line/image.html.twig with content:

      {{ ez_render_field(content, 'image', {parameters: {
          alias: 'small',
          attrs: {class: 'img-fluid img-thumbnail'},
          ezlink: {
              href: path( "ez_urlalias", {"contentId": content.id} ),
              title: content.name
          }
      }}) }}
      

       

      Steps to reproduce:

      1. Login as admin
      2. Start creating a new Content Type: "Gallery"
      3. Make it a container
      4. Add two fieldtypes:
        1. testline
        2. ezcontentquery
      5. Configure query fieldtype:
        1. query type: children
        2. returned type: images
        3. parameters:
          content: '@=content'
          filter:
              content_type: ['@=returnedType']
          sort: 'content_name asc'
          
      1. Create a Gallery Content Item
      2. Create 11 images under it (use multifile upload to speed it up)
      3. When viewing the created Gallery item switch to second page of pagination in the Query field

       

      Expected:

      The results from second page are displayed

       

      Actual:
      Error page about lack of permissions is displayed (even though I'm logged in as admin)
       

      Attachments

        Activity

          People

            Unassigned Unassigned
            marek.nocon@ibexa.co Marek Nocoń
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated: