Articles Report - Not able to download the articles report

OJS Current version: 3.3.0.13
[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/ArticleReportPlugin.inc.php:92

Stack trace:

#0 /home/jott/public_html/lib/pkp/pages/stats/PKPStatsHandler.inc.php(450): ArticleReportPlugin->display(Array, Object(Request))

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

#2 /home/jott/public_html/lib/pkp/classes/core/PKPRouter.inc.php(395): PKPStatsHandler->reports(Array, Object(Request))

#3 /home/jott/public_html/lib/pkp/classes/core/PKPPageRouter.inc.php(246): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)

#4 /home/jott/public_html/lib/pkp/classes/core/Dispatcher.inc.php(144): PKPPageRouter->route(Object(Request))

#5 /home/jott/public_html/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request))

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

#7 {main}

thrown in /public_html/plugins/reports/articles/ArticleReportPlugin.inc.php on line 92

Hi @latha_ojs

The line 92 in /public_html/plugins/reports/articles/ArticleReportPlugin.inc.php 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 config.inc.php 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.

Best,
Israel