Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Apr 2013 at 02:23 UTC
Updated:
29 Jul 2014 at 22:06 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
olli commentedI saw this too: Install drupal, create an article, change front page pager to "Mini" and set "Items per page" to 0. Visit front page, see the warning and "No front page content has been created yet." message.
Comment #3
olli commentedI guess it's not so common to use the mini pager when you want to show all items, but it should be possible to expose the "- All -" items per page option.
Comment #4
olli commentedHere is an alternative that removes pager_default_initialize() and uses updatePageInfo() which is called also when view result is cached.
Comment #6
dawehnerThe fix and the new test looks fine. Did someone tried that with the full pager and maybe even on Drupal 7 views?
Comment #7
alexpott@dawehner can you make it clear if you are rtbc-ing #3 or #4?
Comment #8
olli commented#4: vdc-1958470-4.patch queued for re-testing.
Comment #9
dawehnerI like that updatePageInfo() is moved away from executeCountQuery!
I'm not sure about that line, as 1 is just the wrong number. We have no clue what the total amount of items is of a mini pager, so there should be no lie about it?
Well, actually the pager calculated the total items, it was not returned from the query. Let's improve the assertion message a bit.
Comment #10
olli commentedThanks! Here is an improved assertion message. I'd be equally fine removing the line, since I'm not sure if that assertion is really relevant anymore after this patch, but 1 is the number to expect.
Comment #11
dawehnerAre you really sure that the number 1 is expected. The number is somehow random, because like written before we have no clue what the actual value should be. It seems to be wrong just from the DX side.
Comment #12
olli commentedI'm pretty sure it is 1, there is (just few lines above the assertion):
If we want to keep $view->total_rows NULL, we should revert this change. Should I work on that or do you have better suggestions?
Comment #13
dawehnerI always thought that the total rows is the amount of items which are available, but maybe this is not the case if I read the documentation on ViewExecutable, which also simply could be just broken :) URGS
Comment #14
dawehnerWell, let's keep this then.
Comment #15
catchCommitted/pushed to 8.x, thanks!