Incorrect number of pages in query log if only blocked domains are displayed

Clicking the link in the red box brings me straight to the query log displaying just the blocked queries.

In my example there are just 6 blocked and they're shown correctly on datadable's first page.
The pagination however shows 8 pages, although there is no further data from the second page onwards.

I see similar...
I have 184 entries blocked entries, which covers two pages when show 100 entries is selected after the two first pages there are 36 pages that are empty.

Selecting Percentage Blocked, shows no empty pages.

Oh, I think I know how this is caused. I am currently unable to test but could either of you try to simply click on the "Refresh" button once to see if this fixes it? I think we have to refresh the page to get the page numbers right.

Yes a refresh takes/removes the empty pages

2 Likes

If you want to try my suggestion, you can run
pihole checkout ftl fix/query_log_blocked_cached
if you have installed Pi-hole directly on your system. Don't forget to go back to development once the fix has been confirmed and merged to avoid staying on the (then) stale branch.

If your Pi-hole is in docker, you'd need to build a new image for testing. Details on this on the v6 docker README page.

edit The fix has already been merged into development.

1 Like