Ojs 3.1.1 Usage Statistics not working

@bozana,
Can this fix be suitable to fix the problem in this discussion.

I just used it to patch my installation to display the graph.

Best regards,

3 Likes

Thanks @anupent! :+1: Yes, this might be the problem…

1 Like

I see that before while i was searching for solution but i don’t have “classes/plugins/Plugin.inc.php” in my ojs3 installation in folder “classes/plugins/” i have only this files:
DOIPubIdExportPlugin.inc.php
PubIdPlugin.inc.php
PubObjectCache.inc.php
PubObjectsExportPlugin.inc.php

i don’t know where to put that fix!

i’m using Bootstrap3 Theme not modified, i also tried the original default theme … same problem

it is in the:
lib/pkp/classes/plugins/Plugin.inc.php

1 Like

I did the fix and it works like charm, you was really great help thank you and thak you bozana for support

1 Like

@anupent
Many thanks! It works! :+1:

1 Like

Do you know if this is still an issue for OJS 3.1.2-1 the latest one as of today? Some of our journals statistic do not work. attached are screenshots.

Thanks for any help!

Dung.

ScreenClipA

ScreenClipB

2 Likes

So I agree with the previous poster (dung). We had our OJS installation upgraded from 3.1.1.4 to 3.1.2.1 just this month and the Usage statistics stopped working. Pointers on what could have caused this issue? Any help will be appreciated!

1 Like

@mhkutb hi there,

can you please share what fix did you apply to resolve issue?

best regards,

Dung.

@talknshare hi,

we are making some progress here
[OJS 3.1.2-1] Journal statistic - #5 by dung
if you need help post back to us.

Dung.

1 Like

Thanks! I was following your thread and checked the base url, which is not a problem I guess for me. After the update, it is just a flat line. Do you think PHP version 7.3 could be the problem? I have reverted back to PHP 7 and ran the cron, but still no difference. Do you have any suggestions for me? Is it possible to install a fresh usageStats plugin and would that make a difference?

@talknshare hi, what is your ojs issue? What is your ojs version? New installation or upgrade if so upgrade from what version?

I don’t think php 7.x is a problem.

A flat line in config file is not good. Correct that.

How did you run the cron? How could you confirm if cron did actually run?

Usagestats reinstallation probably won’t help.

Do answer my questions!

Dung.

Thank you, @dung. We recently upgraded our installation from 2.3.6.0 to 2.4.8.4 to 3.1.1.4. At that point, the article statistics were being recorded, as you can see in the chart below. snip_20190622183133
As you can see the 3.1.1.4 version was working fine and started recording the views. But then when we upgraded to 3.1.2.1 (current), it stopped recording.

Yes, changing php to 7 didn’t do anything, so I now have PHP 7.2 running. The hosting provider gives us access to use cron, through cPanel. I ran the cron script there, and the system emails us once the cron job is completed. So I suppose I can count that as job done. I checked the base_url in the config file and it is correctly set. Do you know what could give this problem? Thank you!

Open your ScheduledTasks database table where you will see when and what tasks are executed by ojs 3.1.2-1.

Let me know. We just passed this issue.

D.

Do you have Acron plugin installed?
Did you turn on ScheduledTasks = On in ojs configuration file?
D.

@dung I have the acron plugin installed and have running. The scheduledTasks = On is set in config file. The database table for ScheduledTasks shows as seen in the pic. Maybe Acron is not working?snip_20190624094520

@talknshare look at this link of mine [OJS 3.1.2-1] Journal statistic - #5 by dung
Make sure base_url(s) are defined for each of your journals. This produce stats for us. Let us know.

D.

We only have one journal, and the base url is set correctly. When I am checking the usageEventLogs, there are no log files even for today and other days that the chart is not showing for. I think I am just going to let this one go haha! Thanks for all your help @dung.

1 Like

@bozana I had a problem like that, but mine is in folder “usageStats/usageEventLogs” files log is normal, adding a log automatically, but in DB table “metric” is not updated ? anyone can help me please ?