OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Report generator issue / not collecting statistics

Are you an Editor, Author, or Journal Manager in need of help? Want to talk to us about workflow issues? This is your forum.

Moderators: jmacgreg, michael, vgabler, John

Forum rules
This forum is meant for general questions about the usability of OJS from an everyday user's perspective: journal managers, authors, and editors are welcome to post questions here, as are librarians and other support staff. We welcome general questions about the role of OJS and how the workflow works, as well as specific function- or user-related questions.

What to do if you have general, workflow or usability questions about OJS:

1. Read the documentation. We've written documentation to cover from OJS basics to system administration and code development, and we encourage you to read it.

2. take a look at the tutorials. We will continue to add tutorials covering OJS basics as time goes on.

3. Post a question. Questions are always welcome here, but if it's a technical question you should probably post to the OJS Technical Support subforum; if you have a development question, try the OJS Development subforum.

Report generator issue / not collecting statistics

Postby antoniapop » Mon Jun 16, 2014 7:55 pm

Hello,

I am having trouble collecting statistics and generating reports using an OJS site. I have tried generating custom reports several times, and a csv file is generated, but it is always blank. No analytical information is being stored, although I am certain that content has been viewed and downloaded.

Also, running the "OJS usage statistics report" generates a csv file that contains the following error:

"Fatal error: Call to a member function getLocalizedTitle() on a non-object in /var/www/html/ojs_ucal/pages/manager/StatisticsHandler.inc.php on line 357"

I have enlisted help from IT staff and we have not been able to understand what might be wrong.

Any guidance or advice you could offer would be very much appreciated.

Thanks!
Antonia
antoniapop
 
Posts: 13
Joined: Mon Jun 16, 2014 7:41 pm

Re: Report generator issue / not collecting statistics

Postby bbeghelli » Tue Jun 17, 2014 10:03 am

Hi Antonia,

Sorry the late reply. Can you apply this patch (https://github.com/beghelli/ojs/commit/ ... c1128.diff) and see if it works now?

Thanks,
Bruno
bbeghelli
 
Posts: 183
Joined: Tue Jun 25, 2013 2:22 pm

Re: Report generator issue / not collecting statistics

Postby bbeghelli » Mon Jun 23, 2014 8:31 am

Hi Antonia,

Your error is fixed and now it's a recommended patch: http://pkp.sfu.ca/wiki/index.php?title= ... ed_Patches

The bug entry for this is: http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8806

Regards,
Bruno
bbeghelli
 
Posts: 183
Joined: Tue Jun 25, 2013 2:22 pm

Re: Report generator issue / not collecting statistics

Postby antoniapop » Tue Jul 15, 2014 7:42 am

Hi Bruno,

Thank you for the suggestion. The patch solved the "fatal error" in the OJS usage statistics report and that report is now collecting data.

I have also tried generating custom reports to see article downloads, TOC page views, or journal page views, and the custom reports are blank. I know for certain that there should be some data there. Is there anything you would recommend for this issue?

Thanks again! Your help is much appreciated.

Antonia
antoniapop
 
Posts: 13
Joined: Mon Jun 16, 2014 7:41 pm

Re: Report generator issue / not collecting statistics

Postby bbeghelli » Wed Aug 20, 2014 4:03 pm

Hi Antonia,

Sorry the long time to reply, I just saw your question inside your last message today.

In the plugin management page, inside the generic plugins category, find the acron plugin and please make sure it is enabled. Also, make sure you click on the "reload scheduled tasks" action.

Also, pay attention to the time period you are using to generate the custom reports. You must have usage stats for that period to see something in the report.

If you follow those recommendations and still can't see any data, check if you have files inside your ojs files folder, under usageStats/processed folder. If you have not, please make sure with you system admin that the user that runs php have access read and write access to the ojs files folder, specially the usageStats and below.

The process to read the log files and grab statistics from it runs once every day. So, after you check what I said above, wait for one more day and check again the reports. If you can't find any data still, let us know.

Cheers,
Bruno
bbeghelli
 
Posts: 183
Joined: Tue Jun 25, 2013 2:22 pm

Re: Report generator issue / not collecting statistics

Postby antoniapop » Fri Jan 16, 2015 6:40 am

Hi Bruno,

We are still having problems with the reports not gathering information correctly. We checked the things outlined in your last message, downloaded several articles to make sure that there should be data, and the reports are not working correctly. Is there anything else that you would suggest?

We also updated to version 2.4.5. That did not make any visible difference in the report function.

Thank you for your help!
Antonia
antoniapop
 
Posts: 13
Joined: Mon Jun 16, 2014 7:41 pm

Re: Report generator issue / not collecting statistics

Postby antoniapop » Fri Jan 16, 2015 11:11 am

I should have also mentioned in my most recent post that we did NOT have a directory within the stats folder called "processed".

Here is what we have:

drwxrwsr-x. 2 root apache 16384 Jan 15 21:14 archive
drwxrwsr-x. 2 root apache 4096 Jan 15 21:12 processed <-- Created this directory just in case.
drwxrwsr-x. 2 root apache 4096 Jan 15 13:11 processing drwxrwsr-x. 2 root apache 4096 Jan 14 16:57 reject drwxrwsr-x. 2 root apache 4096 Jan 15 13:11 stage drwxrwsr-x. 2 root apache 4096 Jan 15 13:11 usageEventLogs

Permissions on the folder are correct.

Antonia
antoniapop
 
Posts: 13
Joined: Mon Jun 16, 2014 7:41 pm

Re: Report generator issue / not collecting statistics

Postby antoniapop » Fri Jan 16, 2015 11:26 am

me again...

I also wanted to let you know that we are NOT receiving emails from the system at all regarding usage stats. We know that the administrator should receive an email every time the usage stats loader task is executed, but we have not received any.

We are not sure if the scheduled task for the acron plugin is running even though the plugin is on and the scheduled tasks were reloaded. How could we check if it is actually running?

Thanks again!
Antonia
antoniapop
 
Posts: 13
Joined: Mon Jun 16, 2014 7:41 pm

Re: Report generator issue / not collecting statistics

Postby ctgraham » Fri Jan 16, 2015 11:49 am

A couple of notes:

You will not receive non-error email if your config.inc.php has "scheduled_tasks_report_error_only = On". Is this variable set?

The "processed" folder is actually the "archives" folder. If correctly running, the log files from [files]/usageStats/usageEvents/ will move to [files]/usageStats/stage (in batch) and then to [files]/usageStats/processing (one at a time), and then into [files]/usageStats/archive (if successful) or [files]/usageStats/reject if an error occurs.

If you go to your files location, what shows from an
Code: Select all
ls -l usageStats/*

?
ctgraham
 
Posts: 238
Joined: Thu Apr 03, 2014 5:29 am
Location: Pitt ULS

Re: Report generator issue / not collecting statistics

Postby antoniapop » Mon Jan 19, 2015 11:35 am

1. Nope, the variable "scheduled_tasks_report_error_only = On" is not present in config.inc.php.

2. The results of the command "ls -l usageStats/*" is attached.
Attachments
usageStats.doc
(19.08 KiB) Downloaded 13 times
antoniapop
 
Posts: 13
Joined: Mon Jun 16, 2014 7:41 pm

Re: Report generator issue / not collecting statistics

Postby ctgraham » Tue Jan 20, 2015 8:28 am

It certainly looks like the logs are being successfully processed.

Do you receive other emails from OJS to the email listed as the principal contact in your Site Administration -> Site Settings? If so, is there any spam filter that could be capturing the error messages? The subject line will look something like "Usage statistics file loader task - 5446ebc83d9b1 - Error".

Are you familiar with access to mysql? If so, you can look at the "metrics" table in the database. You should see multiple rows for each "load_id", where "load_id" is the filename that now appears in usageStats/archive. If no rows exist for the filename, but no error appears, my best guess would be a mismatched base_url. For example, if your config.inc.php says your URL is http://myjournal.tld, but access generally actually happens via http://www.myjournal.tld, then this access will be missed. For more information about this issue, see the conversation here: viewtopic.php?f=8&t=13404&p=51618&hilit=base_url#p51618
ctgraham
 
Posts: 238
Joined: Thu Apr 03, 2014 5:29 am
Location: Pitt ULS

Re: Report generator issue / not collecting statistics

Postby antoniapop » Tue Jan 20, 2015 1:59 pm

Is the base_URL stored in the database somewhere? We performed the latest upgrade on a test site which is a complete clone of the live site. The only difference is that the base_URL and the files_dir point to different directories than the live site. The test site uses an exact copy of the live site (although it has been upgraded to 2.4.5). Is it possible that that is where the mismatch could have happened?

I have received two emails that look like that. One had this number in the subject: 54b7f122568b7. The other one had this number: 54b879cb1b9a3.
antoniapop
 
Posts: 13
Joined: Mon Jun 16, 2014 7:41 pm

Re: Report generator issue / not collecting statistics

Postby ctgraham » Tue Jan 20, 2015 2:02 pm

The base_url is defined in your config.inc.php. There should be one base_url line, and optionally multiple base_url[journalName] lines if the base_url is different for "journalName". The mismatch would potentially be between the base_url as defined in config.inc.php and the log file lines. Did the server name change in the upgrade?

What were the contents of the emails you received?
ctgraham
 
Posts: 238
Joined: Thu Apr 03, 2014 5:29 am
Location: Pitt ULS

Re: Report generator issue / not collecting statistics

Postby cedavid » Tue Feb 03, 2015 8:42 am

I am having the same issues. I have a question. What about journals that have say two domain names pointing to the same journal. Does that mean one will show up in the reports and the other will not.
Is there a way to have multiple domains show up in the reports.

Thanks,
Edward
cedavid
 
Posts: 80
Joined: Thu Jul 17, 2014 7:17 am
Location: Calgary, Alberta, Canada

Re: Report generator issue / not collecting statistics

Postby ctgraham » Tue Feb 03, 2015 9:33 am

@cedavid, I assume you are wanting multiple domains of one journal to be consolidated into one journal report, not for multiple domains to create multiple reports.

My concern would be that journals with multiple domain names will not have statistics recorded correctly. The native usageStats logs contain the requested domain name, and I saw this silently discarded if it did not match a base_url entry in config.inc.php. I also had a concern about processing old Apache access logs, especially if these do not record the domain name and have the journal path removed by mod_rewrite, but I'm now thinking that these will be ok because the article id will disambiguate the request. I haven't actually confirmed this.

If you have examples of when stats processing fails for cases of multiple domain aliases, please feel free to contribute to this thread:
viewtopic.php?f=8&t=13404&p=51618
or to this GitHub issue:
https://github.com/pkp/pkp-lib/issues/299
ctgraham
 
Posts: 238
Joined: Thu Apr 03, 2014 5:29 am
Location: Pitt ULS


Return to OJS Editorial Support and Discussion

Who is online

Users browsing this forum: No registered users and 1 guest