Continuing the discussion from Private tags incorrectly shown in tags drop-down:
The tags dropdown filter and the tags page have surprisingly different behaviours, I’ll use https://community.namati.org/ as my example to demonstrate these behaviours (since @tobiaseigen is finding this discrepancy particularly troublesome).
Here we see the dropdown and /tags page side by side. If we look close we can see that there are tags which appear in /tags but not the dropdown (such as
africa), and the opposite (like with
Tags appearing in /tags but not the dropdown is explainable and expected with a
max_tags_in_filter_list which is less than the number of tags which exist, but the reverse is unexpected and seems to me to be a bug.
birthday is a tag which belongs to quite a number of topics, but none of them are accessible to a non-logged in user. The /tags page is, quite sensibly, using a count of the number of posts each tag belongs to which are accessible to the current user, and hiding tags which belong to no accessible posts. The dropdown is exhibiting quite different behaviour by using a count of the total number of topics, accessible to the user or not, in determining whether to show the tag.
Instead, I believe the dropdown should have the same behaviour as the /tags page, determining whether tags should be shown or not based on the number of accessible topics to the current user.