Articles Report - Not able to download the articles report

OJS Current version:
[27-Dec-2022 06:33:10 UTC] PHP Fatal error: Uncaught Error: Call to a member function getData() on null in /public_html/plugins/reports/articles/

Stack trace:

#0 /home/jott/public_html/lib/pkp/pages/stats/ ArticleReportPlugin->display(Array, Object(Request))

#1 /home/jott/public_html/lib/pkp/pages/stats/ PKPStatsHandler->report(Array, Object(Request))

#2 /home/jott/public_html/lib/pkp/classes/core/ PKPStatsHandler->reports(Array, Object(Request))

#3 /home/jott/public_html/lib/pkp/classes/core/ PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)

#4 /home/jott/public_html/lib/pkp/classes/core/ PKPPageRouter->route(Object(Request))

#5 /home/jott/public_html/lib/pkp/classes/core/ Dispatcher->dispatch(Object(Request))

#6 /home/jott/public_html/index.php(68): PKPApplication->execute()

#7 {main}

thrown in /public_html/plugins/reports/articles/ on line 92

Hi @latha_ojs

The line 92 in /public_html/plugins/reports/articles/ file is :

$maxAuthors = max($maxAuthors, count($publication->getData('authors')));

The error your are reporting is related to getData() function. I assume that maybe one submission of your journal might be missing an author and returns the error.

I’d suggest using the debug option in to dump SQL queries to the browser as they’re executed. That way you can look for a query that makes use of this data and see which submission could be missing such info.