Closed (cannot reproduce)
Project:
Drupal core
Version:
8.9.x-dev
Component:
views.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
19 Apr 2016 at 10:43 UTC
Updated:
8 Nov 2021 at 10:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
lohndaniel commentedComment #3
lohndaniel commentedComment #4
lohndaniel commentedI can reproduce it for mini page only. I've created a patch with a possible solution.
The 'postExecute' function is unnecessary seems to me. Another way please give me more info for it. Thanks!
Comment #5
lohndaniel commentedComment #7
dawehnerJust to be clear, the Mini pager is performance optimized, so it doesn't run the pager query by default. This is by design.
Comment #8
lohndaniel commentedComment #9
lohndaniel commentedI've modified patch. It check views footer existing and fill total items variable. Furthermore I've cleaned code for coding standard and readability.
Comment #10
lohndaniel commentedComment #12
Algeron commentedSimilar issue in Views Infinite Scroll: #2791631: Unexpected value for @total token
Comment #13
Algeron commentedThe previous patch fixes the bug in the footer, but not in the header. I've updated the patch to resolve this.
This also seems to fix the related issue in Views Infinite Scroll, which inherits from the Mini class.
Tested the following scenarios and they all look fine:
- Infinite Scroll, no total
- Infinite Scroll, total in header
- Infinite Scroll, total in footer
- Mini, no total
- Mini, total in header
- Mini, total in footer
Comment #14
Algeron commentedAccidentally deleted some existing documentation, among other things. Updated patch.
Comment #16
Algeron commentedHm, I can't get the patch to apply cleanly using composer, for some odd reason.
I removed the code cleanup and stuck to the bugfix. Sorry for the notification spam!
Comment #18
Algeron commentedI swear I'll get it right some day... >_>
Comment #20
dawehnerIt would be quite helpful to just have functional changes in the patch. You know, its a bit hard to also review other changes, like the CS changes at the beginning.
IMHO the right way to implement this would be to let these area handlers tell the view to get all counts using
$this->view->get_total_rows = TRUEComment #30
quietone commented@gulab.bisht Thank you for reporting this problem. We rely on issue reports like this to improve Drupal core.
I tested this on 8.9.x and 9.3.x, standard install and devel generated content, and was not able to reproduce this error. I followed the steps given in the Issue Summary.
Therefore, closing as cannot reproduce. If you are experiencing this problem reopen the issue, by setting the status to 'Active', and provide complete steps to reproduce the issue (starting from "Install Drupal core").
Thanks!