openstreetmap-website icon indicating copy to clipboard operation
openstreetmap-website copied to clipboard

Users with hidden diary entries have the hidden entries included within their diary count

Open SomeoneElseOSM opened this issue 6 years ago • 2 comments

A user on the live site has 1 hidden diary entry and no un-hidden ones. Their "user" page shows "Diary 1", but when you click on diary it says "No diary entries".

In a sense what it's saying is correct, but I'd imagine it could be confusing to users.

SomeoneElseOSM avatar Jun 22 '19 23:06 SomeoneElseOSM

That's no different to the other counters, and probably hard to fix because counter caches are a bit a hacky.

tomhughes avatar Jun 22 '19 23:06 tomhughes

Yes I just checked and counter caches don't seem to have any way to specify extra conditions - they just count the number of records of one type that are associated with a record of a different type.

So there is no way to limit it to visible records only.

There are a few third party gems that can do it.

tomhughes avatar Jun 22 '19 23:06 tomhughes