Support option overrides from viewsreference module

Created on 3 December 2020, about 4 years ago
Updated 31 March 2024, 9 months ago

Problem/Motivation

I discovered, that overrides to the "items per page" option, which are set using the viewsreference module, are replaced by views_show_more's "initial items" value and therefore have no effect on initial load. If you load more items the overridden value will be used correctly, though.

views_show_more: 1.0.0
viewsreference: 2.0.0-beta2

Steps to reproduce

1. Setup a view using the show more pager and set "initial items" to "8" and "items per page" to "4".
2. Configure a viewsreference field and place the mentioned view in a node.
3. Check that the view shows 8 items on load, 4 new items after loading more.
4. Edit the node again and override the "items per page" option with a value of "2" using the "options" fieldset of viewsreference.
5. See that the view still shows 8 items (instead of 2), but loads 2 new items after triggering "load more"

Proposed resolution

Find a way not to override these kind of option changes or support viewsreference globally. I attached a patch to describe a quick solution to the problem, but a more general way should be preferred.

Feature request
Status

Needs work

Version

2.0

Component

Code

Created by

🇩🇪Germany ABaier

Live updates comments and jobs are added and updated live.
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