Hi @asmecher,
the patch causes a blank pages in every pages beyond login. This is the error log
[Mon Jul 06 21:50:23 2015] [error] [client 130.186.18.97] ojs2 has produced an error\n Message: WARNING: Cannot modify header information - headers already sent by (output started at /var/ojs/classes/issue/IssueDAO.inc.php:858)\n In file: /var/ojs/lib/pkp/classes/core/PKPRequest.inc.php\n At line: 87\n Stacktrace: \n Server info:\n OS: Linux\n PHP Version: 5.4.39-0+deb7u2\n Apache Version: Apache/2.2.22 (Debian)\n DB Driver: postgres\n DB server version: PostgreSQL 9.1.12 on x86_64-unknown-linux-gnu, compiled by gcc (Debian 4.7.2-5) 4.7.2, 64-bit
I tried to bypass the error (run the process with the patch and see the results without the patch
I saw that all files were processed (now they are /ojs-uploads/leo/usageStats/archive directory) but the report (e.g. OJS usage statistics report at http://ojstest.test.it/index.php/jjournal/manager/statistics?statisticsYear=2015 ) are without any data.
Moreover, I fond that in the new COUNTER report (the one generated with new usagestats plugin) I have data only for some journals. Other journals are not listed at all.
Hi @ctgraham,
I find the problem (thank you for pointing out the base_url setting)
In my installation I have several journals: some with custom urls and some with the url of the site index
In my config.inc.php I added baseurl overrides olny for journals with custom urls and I didn’t find data for a journal in the site index path (leo.cineca.it/index.php/jlis, below you can see the whole configuration)
Now I’ve added an override for jlis, too and re-processed the logs, so I now can see data for this journal, too.
It seems a strange behavior, for me, because I thought that overrides was only for custom urls.
Yes, with that configuration of base_url = http://leo.cineca.it and overrides for anything not hanging off of http://leo.cineca.it, I wouldn’t have expected a problem.
In adding the base_url[index] line, I personally would have entered: base_url[index] = http://http://leo.cineca.it/index.php/index
but I don’t have an exactly parallel installation to use as a test for comparison, and your config might be correct.
In this case, too, I find the data only for interfaces journal and no data for all other journals.
It seems to me a bit complicated to explicitly add in overrides all the journal if only one needs to have a custom url.
What is your restful_urls value? You seem to be mixing restful urls (http://riviste.unimi.it/interfaces) and urls with the index.php component (http://riviste.unimi.it/index.php/DoctorVirtualis). I bet that is confusing the Usage Stats process, but you are able to override the confusion by manually entering base_urls with the index.php component.
I wonder how your journals with restful URLs are working with restful_urls = Off.
You can test your theory by turning off scheduled_tasks_report_error_only and examining the mail from (re)procesing a logfile. I suspect the email will report the warning plugins.generic.usageStats.removeUrlError (“Could not remove base URL from…”) for each line relating to access within one of these journals.
This would come from:
A quick reading of the logic in the Core::_getBaseUrlAndPath() might point to the situation you are describing:
So, the log of processing log is full of rows similar to this one
[2015-07-07 17:39:39] [Warning] The line number 2 from the file /ojs-uploads/riviste.unimi/usageStats/processing/usage_events_20150629.log contains an url that the system can't remove the base url from.
the line 2 of the log file is
5.9.112.6 - - "2015-06-29 00:00:23" http://riviste.unimi.it/index.php/promoitals/article/download/433/621 200 "Mozilla/5.0 (Macintosh; Intel Mac OS X 1084) AppleWebKit/536.29.13 (KHTML like Gecko) Version/6.0.4 Safari/536.29.13"
this is an url without override
If I add in config.inc.php an override for each base_url[journalname] (ever if it is the same of the root base_url) and then re-run the log processing the sceduled task log has no errors and the data are shown.