Ajax + Allow settings: Allowed settings lost on ajax (exposed forms/pager)

Created on 7 February 2013, almost 12 years ago
Updated 22 June 2023, over 1 year ago

If a view uses ajax, and user can able to change Items per page value + pager exits, the pager won't work as well, if 'items per page' has different value, than the original view's pager option.
To reproduce: Create a view pane, Set pager to 'Paged output, full pager', and set 'Items to display' on views pager settings form to 10. On pane configuration let the 'Allow settings' check 'Items per page'.
Then add a new pane, and set 'Item per page' on pane input form to 1.

On page load, the 1 item will show up with pager. Then use pager, the result will be 10 item, as in the original view was set up.

This is, because the ajax callback of views just load the default view settings, and give back $this->preview() as result. No chance to add the pane's own parameters.

I'm not sure how do we need to handle this.. I tried to extend the preview() in views_content_plugin_display_panel_pane.inc, but I didn't get any relevant information from exisiting variables. The one of my idea to pass number of items by url, but I'm not sure, this is the best way (I think, we could have other pane settings, which would be lost)

πŸ› Bug report
Status

Needs review

Version

1.0

Component

Views Content

Created by

πŸ‡­πŸ‡ΊHungary szantog

Live updates comments and jobs are added and updated live.
  • Needs tests

    The change is currently missing an automated test that fails when run with the original code, and succeeds when the bug has been fixed.

  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024