Skip to content

Article hits counter increments unconditionally for the same user in the same session #47418

@CSGoat0

Description

@CSGoat0

What happened?

I've noticed that the article hits counter increases every time a user revisits an article page, even within the same session. This seems to be happening unconditionally without any limitations.

Image

Version

5.4

Expected result

I'm not entirely sure what the intended behavior should be, but I see a few possibilities:

  • Once per user lifetime – The counter should increment only once per user for each article, regardless of how many times they visit it (even across different sessions).

  • Once per session – The counter should increment only once per user session. If the session ends and the same user visits the article again in a new session, it would increment once more.

  • Current behavior (unlimited) – The counter increments unconditionally every time the article is accessed, even by the same user in the same session. (This could potentially be exploited to artificially inflate hit counts or affect layouts that display popular articles.)

Actual result

When a user visits an article, the hits counter increments by 1.
If the same user revisits the article multiple times in the same session, the counter continues to increase.
(visit article +1, go back, revisit the same article +1, and so on)

There is no apparent limitation preventing multiple counts from the same user/session.
This also happens at Preview window at the admin panel.
(Preview +1, close, Preview +1, and so on)

System Information

No response

Additional Comments

I'd appreciate clarification on which behavior is actually intended so I can better understand if this is a bug or working as designed. If it's not intended, I'd be happy to help look into a solution.

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions