Provide filter/pager values to pagination via exposed_input/exposed_raw_input

Created on 3 February 2023, almost 2 years ago
Updated 14 June 2023, over 1 year ago

Problem/Motivation

When using pagination on an adaptable block, the filter and pager settings from pagedesigner are not passed on to the pager plugin. This leads to false result being loaded on subsequent pages.

Steps to reproduce

  1. Create an adaptable block with an exposed filter, limit items per page to less then the total items
  2. Include the block into a page via pagedesigner, set the filter value
  3. Navigate to page two on the block: The filter values are not transmitted as part of the request

Proposed resolution

Make sure that settings are passed to the pager plugin via exposed_input/exposed_raw_input in the view executable.
Something along these lines
$build['#view']->exposed_raw_input = processSettings($settings)

Possible problems

  • The exposed input must only be set on the specific view instance
  • The exposed input must conform to the expected format of the corresponding filter and pager

Remaining tasks

  1. Check whether effect is local on the exact ViewExecutable
  2. Write tests to detect misformed data
📌 Task
Status

Fixed

Version

2.2

Component

Code

Created by

🇨🇭Switzerland pvbergen

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024