Also reported by lrobeson, http://drupal.org/node/1110180#comment-4375962
Related to #652712: Pager settings are not stored. In that issue it looks like pager settings were fixed on a per display basis, and I do not see any changes to the code although I haven't looked that in-depth. As an unrelated issue, tests written for pagers are broken now as well.
I'll try to look for a git commit that regressed this as it was reported working by Dereine in the issue noted above.
Steps to reproduce
- Create a new view.
- Create a couple of block displays.
- Try to override the number of items per page for each display. It will change the option for every display instead of just for the overridden display.
Also, I tried modifying a view template with the items, and it views imports it with the same items per page regardless (although that template may be incorrectly formatted). In other words, I exported the example view, try to add those lines to the display, re-import, but that does not work either.
Attached a view to try out. I can't take screenshots well on this windows box (ugh) so I don't have any. Issue confirmed on two different installations by two different people Today as well as the note by lrobeson.
Comment | File | Size | Author |
---|---|---|---|
#12 | 1144740-pager-defaultable-sections_0.patch | 3.15 KB | dawehner |
#10 | 1144740-pager-defaultable-sections.patch | 1.92 KB | merlinofchaos |
#9 | 1144740-pager-defaultable-sections.patch | 1.48 KB | merlinofchaos |
#8 | 1144740.patch | 1.94 KB | dawehner |
#6 | 1144740-fix.patch | 2.12 KB | dawehner |
Comments
Comment #1
dawehnerSadly i can reproduce this.
Comment #2
fandb CreditAttribution: fandb commentedI can reproduce this as well.
Although References display appears to work properly.
Comment #3
mradcliffeAfter undergoing some more manual testing I was able to override pager items only when I first overrode the pager type. (Long post incoming)
This makes sense with the following work flow:
#1
But not with this one:
#2
Confusingly, you can override number of items without first overriding the pager if you have a cloned display where the pager is already overridden.
#3
But if you clone a display that has not already overridden the pager, it works as above in #2.
So the question becomes:
Should overriding the settings for a pager (and other plugins?) override the pager itself, or should the work flow in #1 and #3 be a part of Views use documentation?
Edit: This makes sense to me as-is, but it is confusing if you come at making views from #2. I think that stronger docs or explanation as part of overriding would help.
Comment #4
dawehnerYou can only override the pager itself, because it's the only way to be sure that the options mean what you mean in your pager plugin and the options are attached to the plugin.
Comment #5
OldAccount CreditAttribution: OldAccount commentedSubscribing
Comment #6
dawehnerSome stuff:
* items_per_page, offset still exist in quite some places in the code. Here is a patch for it.
In general i have no idea how this defaultable_section etc. stuff works.
Earl please here here.
Comment #7
geek-merlinconfirming and subscribing
Comment #8
dawehnerUpdate status and bump for merlinofchaos. It's really hard for me here.
Here is the new version
Comment #9
merlinofchaos CreditAttribution: merlinofchaos commentedTry this patch and see if it works
Comment #10
merlinofchaos CreditAttribution: merlinofchaos commentedTry this:
Comment #11
mradcliffeI am a little crunched for time at the moment, but I will try when I can myself.
Comment #12
dawehnerOkay, fixed the override button by reverting another commit.
Now this patch works fine. Added the pattern to access and cache plugin and removed the items_per_page setting again.
Comment #13
steinmb CreditAttribution: steinmb commentedThe patch seems sound and safe, but I'm a bit out of my depth when it comes to Views code base. From a usability point of view (ehem...) does this now make sense, and pager override work just fine on our installations.
Thanks :)
Stein
Comment #14
dawehnerThis shouldn't be removed, because this would bork the automatic update from views2
Powered by Dreditor.
Comment #15
dawehnerCommited to 6.x-3.x and 7.x-3.x with a comment about legacy code.