PHP Fatal error: Uncaught Error: Call to a member function getData() on null in plugins/reports/articles/ArticleReportPlugin.php:115

Hello,
We are on OJS 3.4.0-6.

I am getting the following when I try to run Article Report

PHP Fatal error: Uncaught Error: Call to a member function getData() on null in plugins/reports/articles/ArticleReportPlugin.php:115\nStack trace:\n#0 lib/pkp/pages/stats/PKPStatsHandler.php(589): APP\plugins\reports\articles\ArticleReportPlugin->display()\n#1 lib/pkp/pages/stats/PKPStatsHandler.php(537): PKP\pages\stats\PKPStatsHandler->report()\n#2 [internal function]: PKP\pages\stats\PKPStatsHandler->reports()\n#3 lib/pkp/classes/core/PKPRouter.php(334): call_user_func()\n#4 lib/pkp/classes/core/PKPPageRouter.php(277): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest()\n#5 lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPPageRouter->route()\n#6 lib/pkp/classes/core/PKPApplication.php(388): PKP\core\Dispatcher->dispatch()\n#7 index.php(21): PKP\core\PKPApplication->execute()\n#8 {main}\n thrown in plugins/reports/articles/ArticleReportPlugin.php on line 115,

I suspect it is a data issue, however I would suggestions of how I can pinpoint the particular data piece causing the error, more like looking into the database.

Regards,
Nason

Hi @Nason_Bimbe,

This is likely due to a submission that doesn’t have a current publication attached to it. You can find these with the following query:

SELECT s.*
FROM submissions s
LEFT JOIN publications p ON (s.current_publication_id = p.publication_id)
WHERE p.publication_id IS NULL;

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you @asmecher I have run the query and did not report anything. I still get the same error.

Regards,
Nason