You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
pi-hole web-ui when adding domain to blocklist via the query page it is still being displayed and the button to block the domain is still present #1202
How familiar are you with the the source code relevant to this issue?:
{Replace this with a number from 1 to 10. 1 being not familiar, and 10 being very familiar}
1
Expected behaviour:
after a domain is added to the blocklist the domain should not be listed any more {A detailed description of what you expect to see}
I expect the domain to have a button that says blacklist converted to whitelist to signifie that the domain has been blacklisted or whitelisted.
Actual behaviour:
the button that states blacklist is still present below the domain
so i blacklist github.com via this url: http://pi.hole/admin/queries.php?client=192.168.122.1
I wate a few seconds,
and refresh the page using control plus f5
the button that says blacklist is still there
it has not turned in to a button that says whitelist.
I hope this makes sence,
{A detailed description and/or screenshots of what you do see}
Steps to reproduce:
log in to your pi-hole webui
go to one of your named clients where it says
top clients total
and click on one of the names of your connected clients.
3.
try to block a domain
4.
refresh the page after a few seconds.
5
you will see that the blacklist button is still present
below the domain you just tryed blacklisting,
note, the domain does get blacklisted.
it is not displayed on the web-ui.
Troubleshooting undertaken, and/or other relevant information:
i'm running pi-hole on the dev-trane,
and understand that breakages are a feature of this.
updated to the very latest dev version {Steps of what you have done to fix this}
I'm not sure this problem is related to records on memory holding the previous states.
I think the buttons (and background colors) are selected according to what happened when the query was made.
This table shows the historical blocking status (recorded when the query was made), not the current blocking status.
The button will never change, because the code never checks the current blocking status of each domain (it uses what is on the database).
Still relevant in v6. The Allow/Block buttons in the query log are rendered from the query's historical status, not the domain's current list membership. The fix would require checking each domain against the current allow/deny lists during table rendering (as already noted)
Low-priority UX issue — the button still works, it just doesn't reflect that the action was already taken. Suggest relabeling as enhancement/low-priority.
Activity
github-actions commentedon Jan 11, 2022
This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.
yubiuser commentedon Jan 12, 2022
I just tried it, it is still reproducible. I think the issue here is that we don't check the black/whitelist when we reload data from memory.
rdwebdesign commentedon Oct 19, 2022
I'm not sure this problem is related to records on memory holding the previous states.
I think the buttons (and background colors) are selected according to what happened when the query was made.
This table shows the historical blocking status (recorded when the query was made), not the current blocking status.
The button will never change, because the code never checks the current blocking status of each domain (it uses what is on the database).
yubiuser commentedon Oct 20, 2022
You're right. With the current implementation it will never change the button. It decides only based on the status of the domain when it was made.
https://github.com/pi-hole/AdminLTE/blob/c2afe4221ac275a1c082e1d8e14ccbb6113b0e7b/scripts/pi-hole/js/queries.js#L123-L130
We would need to de-couple the button from the query status
rdwebdesign commentedon Oct 20, 2022
To achieve this, we would need to verify the status of every domain during the HTML table creation.
DL6ER commentedon Mar 25, 2026
Still relevant in v6. The Allow/Block buttons in the query log are rendered from the query's historical status, not the domain's current list membership. The fix would require checking each domain against the current allow/deny lists during table rendering (as already noted)
Low-priority UX issue — the button still works, it just doesn't reflect that the action was already taken. Suggest relabeling as enhancement/low-priority.
github-actions commentedon Apr 24, 2026
This issue is stale because it has been open 30 days with no activity. Please comment or update this issue or it will be closed in 5 days.