Problem with statistics log (usageStats, metrics)

Hi,

I have installed OJS 2.4.7 and I have a problem with the statistics logs (metrics table). The log file only have information for abstracts page, but not for PDF downloading.

/usageStats/usageEventLogs/usage_events_20151026.log

127.0.0.1 administrative 1 "2015-10-26 09:26:26" http://localhost/ojs247/index.php/ACE/issue/view/2 200 "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36"
127.0.0.1 administrative 1 "2015-10-26 09:26:28" http://localhost/ojs247/index.php/ACE/article/view/2 200 "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36"
127.0.0.1 administrative 1 "2015-10-26 09:26:36" http://localhost/ojs247/index.php/ACE/issue/view/2 200 "Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/46.0.2490.80 Safari/537.36"

When I click in PDF link, i get an error in apache error_log:

[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP Fatal error:  Call to a member function getRequest() on a non-object in /opt/lampp/htdocs/ojs247/plugins/generic/usageStats/UsageStatsPlugin.inc.php on line 223, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP   1. {main}() /opt/lampp/htdocs/ojs247/index.php:0, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP   2. PKPApplication->execute() /opt/lampp/htdocs/ojs247/index.php:64, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP   3. Dispatcher->dispatch() /opt/lampp/htdocs/ojs247/lib/pkp/classes/core/PKPApplication.inc.php:178, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP   4. PKPPageRouter->route() /opt/lampp/htdocs/ojs247/lib/pkp/classes/core/Dispatcher.inc.php:134, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP   5. PKPRouter->_authorizeInitializeAndCallRequest() /opt/lampp/htdocs/ojs247/lib/pkp/classes/core/PKPPageRouter.inc.php:220, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP   6. call_user_func() /opt/lampp/htdocs/ojs247/lib/pkp/classes/core/PKPRouter.inc.php:362, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP   7. ArticleHandler->viewFile() /opt/lampp/htdocs/ojs247/lib/pkp/classes/core/PKPRouter.inc.php:0, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP   8. Action->viewFile() /opt/lampp/htdocs/ojs247/pages/article/ArticleHandler.inc.php:344, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP   9. ArticleFileManager->downloadFile() /opt/lampp/htdocs/ojs247/classes/submission/common/Action.inc.php:195, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP  10. FileManager->downloadFile() /opt/lampp/htdocs/ojs247/classes/file/ArticleFileManager.inc.php:276, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP  11. HookRegistry->call() /opt/lampp/htdocs/ojs247/lib/pkp/classes/file/FileManager.inc.php:278, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP  12. call_user_func() /opt/lampp/htdocs/ojs247/lib/pkp/classes/plugins/HookRegistry.inc.php:89, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP  13. UsageEventPlugin->getUsageEvent() /opt/lampp/htdocs/ojs247/lib/pkp/classes/plugins/HookRegistry.inc.php:0, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP  14. HookRegistry->call() /opt/lampp/htdocs/ojs247/plugins/generic/usageEvent/UsageEventPlugin.inc.php:108, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP  15. call_user_func() /opt/lampp/htdocs/ojs247/lib/pkp/classes/plugins/HookRegistry.inc.php:89, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2
[Mon Oct 26 09:26:31 2015] [error] [client 127.0.0.1] PHP  16. UsageStatsPlugin->logUsageEvent() /opt/lampp/htdocs/ojs247/lib/pkp/classes/plugins/HookRegistry.inc.php:0, referer: http://localhost/ojs247/index.php/ACE/article/view/2/2

Would you please help?
Thanks in advance!!

Hi,

I updated to 2.4.7.1 and I have the same problem here.
Someone can help us?

Hi,

Can someone please help us with this problem?
Those statistics are very important to my institution. I have no ideia about what can be done.

Best regards.

Tarcisio Pereira

Yes, it is unfortunately a bug I introduced :frowning: The patch is coming…

Thank you a lot.
I will be waiting for it.

Hi @Tarcisio_Pereira and @franms,

Thanks for letting us know. The fix is here: https://github.com/pkp/ojs/commit/3f0b0e91bec089cf912ba93905b292f658e515c5.diff

Cheers,
Bruno

Hi @beghelli,

Fixed!!!
Thank you very much.

Best regards.
Fran

Worked as expected on our installation as well, thx for the bugfix!

All best,
Reto

Hi,

Fixed. Thank you all.

Best regards.
Tarcisio Pereira.

Hey All,

I am new to this system and i was wondering if the new version of the OJS 2.4.7 comes with the plug-in that allows visitors to view the number of viewing/download for all articles that have been published. The column on the right shows the example.

Hi @Dein,

Although the system has a plugin that counts what you said, the last release doesn’t implement something like that. You would have to see those numbers under the submission editing page, in the galleys section, or using the statistics and reports page, using the stats reports.

Regards,
Bruno

Hey @Beghelli,

I realised that. But, is there anyway that i can change the PHP codes so that i’d be able to produce such configurations?

Kudos,
Dein

Hey Guys,

So any news on how to publish the number of views and number of downloads for public viewing?

Regards
Dein

Hi @Dein,

I’ve responded to your question over here:
http://forum.pkp.sfu.ca/t/abstract-views-pdf-views-and-download-stats-made-public-no-mouth

Please don’t double-post; it clutters the forum.

Regards,
Alec Smecher
Public Knowledge Project Team