Problem/Motivation

After Enabling the statistics module I found node view counts only showing in EN language. I have a website with multi-language enabled. English language is the default and Turkish is the secondary language. Node view counts only show in English language. In Turkish it always shows 1 view.

Issue fork drupal-3436239

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Issue fork statistics-3436239

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

pankajlogical created an issue. See original summary.

Janvi Dasani changed the visibility of the branch 3436239-node-view-counts to hidden.

Janvi Dasani changed the visibility of the branch 3436239-node-view-counts to active.

fgm’s picture

Project: Drupal core » Statistics
Version: 9.5.x-dev » 1.0.0-beta1
Component: statistics.module » Code

Since D9 is EOL, moved issue to the contrib version of Statistics.

samit.310@gmail.com made their first commit to this issue’s fork.

samitk’s picture

Status: Needs work » Postponed (maintainer needs more info)

It is working at my end, i am getting the Node view counts in all the languages,
The only problem I found is, all the languages have the same count,
For Example: If node id 1 in English have 10 count, then I translate node i to another language it also have the same count 10, ideally it should starts from 1.

@fms please suggest.

Thanks
Samit K.

fgm’s picture

Version: 1.0.0-beta1 » 1.x-dev
Category: Bug report » Feature request
Status: Postponed (maintainer needs more info) » Active

Good to learn this now works.

For versions 1.x this is as designed (feature, not bug) : the statistics table accumulates views across languages and revisions, keeping only a single count per node, and will not change in 1.x for compatibility.

This is something that we probably want to change in 2.x indeed. Accordingly, converting to feature for the next version.

samitk’s picture

Version: 1.x-dev » 1.0.0-beta1
Category: Feature request » Bug report
Status: Active » Postponed (maintainer needs more info)

HI @fms,

Do we need a new ticket for this feature request?

Thanks
Samit K.

samitk’s picture

Version: 1.0.0-beta1 » 1.x-dev
Category: Bug report » Feature request
Status: Postponed (maintainer needs more info) » Active