[OJS 3.2.1.1] Generation of PKP Usage statistics report fails with 500 Http error

Hi everyone I have noticed that the PKP Usage statistics report fails when I try to generate it. I got the following page:

Looking in the Apache log files, in the error_log I did not find anything; but in the access_log I have found this:

192.168.0.1 - - [28/Sep/2020:18:22:08 -0500] "GET /andamios_ojs3211/index.php/andamios/management/tools/generateReport?metricType[]=ojs%3A%3Acounter&columns[]=assoc_id&columns[]=assoc_type&columns[]=file_type&columns[]=submission_id&columns[]=context_id&columns[]=pkp_section_id&columns[]=city&columns[]=region&columns[]=country_id&columns[]=month&columns[]=metric_type&columns[]=metric&columns[]=assoc_object_id&filters=%7B%22context_id%22%3A1%7D&orderBy=%7B%22month%22%3A%22ASC%22%7D HTTP/1.1" 500 -

Do I need some configuration more to make work the generation of this kind of report? All the other reports work fine, it’s only the PKP Usage statistics report which fails.

Thanks a lot for your attention.
Best regards.

Hi @juancure,

The title of the post says you encountered a 505 error but the screenshot says 500; is that a typo or are there two different errors?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher I made a mistake in the post’s title, the message of error is HTTP Error 500 in the screenshot and in the log both.

Do you know what is the reason of this error message?

Thanks a lot for your time.

Hi @juancure,

Were you able to find something in your PHP error log? Something should appear corresponding to the 500 error.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher and @juancure, this problem looks similar to this opened by @marchitelli.
I checked 2 of our journals, finding one with the same problem, and the other starting the download of the csv without problems.
In the one with the problem the URL after the click on the “PKP Usage statistics report” button becomes as below.
I hope this helps.
Best regards
Stefano

“https://riviste.unimi.it/index.php/noema/management/tools/generateReport?metricType[]=ojs%3A%3Acounter&columns[]=assoc_id&columns[]=assoc_type&columns[]=file_type&columns[]=submission_id&columns[]=context_id&columns[]=pkp_section_id&columns[]=city&columns[]=region&columns[]=country_id&columns[]=month&columns[]=metric_type&columns[]=metric&columns[]=assoc_object_id&filters=a%3A1%3A%7Bs%3A10%3A%22context_id%22%3Bs%3A2%3A%2210%22%3B%7D&orderBy=a%3A1%3A%7Bs%3A5%3A%22month%22%3Bs%3A3%3A%22ASC%22%3B%7D”

Hi @bolelligallevi,

Were you able to identify any kind of log message to go with the 500 errors?

Regards,
Alec Smecher
Public Knowledge Project Team

I am also having the same issue. I am using OJS 3.2.1.4. I am able to get Article Report but not able to get Review Report, Editorial Activity etc.

Hi @asmecher, these are our log for the problem. My IT staff says it it the same error and log message of this thread, but I’m not so sure that an update (as you say on that thread) can solve the problem because @marchitelli has the same 500 issue on 3.2…
Can you see if there are two (or more: actually I’m counting 3 thread: this, the above one, and this, plus one in italian) different 500 issues spread on different versions, or if the problem is only one?
@latha_ojs, can you provide your logs about PKP Usage statistics report?
Thank you very much, best regards
Stefano

PHP message: PHP Fatal error: Uncaught Error: [] operator not supported for strings in /xxxxx/xxxxx/xxxxx/classes/statistics/MetricsDAO.inc.php:34 Stack trace: #0 /xxxxx/xxxxx/xxxxx/plugins/generic/usageStats/PKPUsageStatsReportPlugin.inc.php(84): MetricsDAO->getMetrics('ojs::counter', Array, 'a:1:{s:10:"cont...', 'a:1:{s:5:"month...', NULL)\n #1 /xxxxx/xxxxx/xxxxx/plugins/generic/usageStats/OJSUsageStatsReportPlugin.inc.php(32): PKPUsageStatsReportPlugin->getMetrics('ojs::counter', Array, 'a:1:{s:10:"cont...', 'a:1:{s:5:"month...', NULL)\n #2 /xxxxx/xxxxx/xxxxx/lib/pkp/pages/management/PKPToolsHandler.inc.php(208): OJSUsageStatsReportPlugin->getMetrics('ojs::counter', Array, 'a:1:{s:10:"cont...', 'a:1:{s:5:"month...')\n #3 /xxxxx/xxxxx/xxxxx/lib/pkp/pages/management/PKPToolsHandler.inc.php(64): PKPToolsHandler->generateReport(Array, Object(Request)) referer: https://riviste.unimi.it/index.php/noema/management/tools