Reporting Three PHP fatal errors “Uncaught Error: Call to a member function getData() on null ”

OJS version 3.3.0-13, PHP version 7.4.32

First Erorr:

[26-Oct-2022 23:13:17 Asia/Baghdad] PHP Fatal error:  Uncaught Error: Call to a member function getData() on null in /home2//public_html/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php:64
Stack trace:
#0 /home2/public_html/plugins/importexport/crossref/filter/IssueCrossrefXmlFilter.inc.php(131): ArticleCrossrefXmlFilter->createJournalIssueNode(Object(DOMDocument), Object(Submission))
#1 /home2//public_html/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php(47): IssueCrossrefXmlFilter->createJournalNode(Object(DOMDocument), Object(Submission))
#2 /home2//public_html/plugins/importexport/crossref/filter/IssueCrossrefXmlFilter.inc.php(67): ArticleCrossrefXmlFilter->createJournalNode(Object(DOMDocument), Object(Submission))
#3 /home2//public_html/lib/pkp/classes/filter/Filter.inc.php(449): IssueCrossrefXmlFilter->process(Array)
#4 /home2//public_html/classes/plugins/PubObjectsExportPlugin.inc.php(391): Filter->execute(Array, true) in /home2/public_html/plugins/importexport/crossref/filter/ArticleCrossrefXmlFilter.inc.php on line 64

Second Erorr:

PHP Fatal error:  Uncaught Error: Call to a member function getId() on null in /home2//public_html/lib/pkp/controllers/grid/notifications/TaskNotificationsGridHandler.inc.php:40
Stack trace:
#0 /home2/public_html/lib/pkp/classes/controllers/grid/GridHandler.inc.php(314): TaskNotificationsGridHandler->loadData(Object(Request), NULL)
#1 /home2/public_html/lib/pkp/classes/controllers/grid/GridHandler.inc.php(1032): GridHandler->getGridDataElements(Object(Request))
#2 /home2/public_html/lib/pkp/classes/controllers/grid/GridHandler.inc.php(923): GridHandler->renderGridBodyPartsInternally(Object(Request))
#3 /home2/public_html/lib/pkp/classes/controllers/grid/GridHandler.inc.php(643): GridHandler->doSpecificFetchGridActions(Array, Object(Request), Object(TemplateManager))
#4 /home2/public_html/lib/pkp/classes/core/PKPRouter.inc.php(395): GridHandler->fetchGrid(Array, Object(Request))
#5 /home2/public_html/lib/pkp/cla in /home2/public_html/lib/pkp/controllers/grid/notifications/TaskNotificationsGridHandler.inc.php on line 40

Third erorr:

[27-Oct-2022 15:54:47 Asia/Baghdad] PHP Fatal error:  Uncaught Error: Call to a member function getAssocId() on null in /home2/public_html/lib/pkp/controllers/grid/files/SubmissionFilesCategoryGridDataProvider.inc.php:131
Stack trace:
#0 /home2/public_html/lib/pkp/classes/controllers/grid/CategoryGridHandler.inc.php(402): SubmissionFilesCategoryGridDataProvider->loadCategoryData(Object(Request), 1, Array)
#1 /home2/public_html/lib/pkp/classes/controllers/grid/CategoryGridHandler.inc.php(124): CategoryGridHandler->loadCategoryData(Object(Request), 1, Array)
#2 /home2/journaluokufaedu/public_html/lib/pkp/classes/controllers/grid/CategoryGridHandler.inc.php(473): CategoryGridHandler->getGridCategoryDataElements(Object(Request), 1)
#3 /home2/public_html/lib/pkp/classes/controllers/grid/CategoryGridHandler.inc.php(453): CategoryGridHandler->_renderCategoryInternally(Object(Request), Object(SelectableSubmissionFileListCategoryGridRow))
#4 /home2/public_html/lib/pkp/classes/controllers in /home2/public_html/lib/pkp/controllers/grid/files/SubmissionFilesCategoryGridDataProvider.inc.php on line 131
[26-Oct-2022 22:28:28 Asia/Baghdad] PHP Deprecated:  Non-static method AccessKeyManager::generateKeyHash() should not be called statically in /home2/public_html/pages/reviewer/ReviewerHandler.inc.php on line 78
[26-Oct-2022 22:53:01 Asia/Baghdad] PHP Deprecated:  Non-static method AccessKeyManager::generateKeyHash() should not be called statically in /home2/public_html/pages/reviewer/ReviewerHandler.inc.php on line 78
1 Like

I’m not sure if that will solve the errors above but I’ve changed PHP version to 8.0.24. Then, citationStyleLanguage plugin produced the warnings below:

[27-Oct-2022 23:08:01 Asia/Baghdad] PHP Warning:  Attempt to read property "single" on null in /home2/public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/citeproc-php/src/Rendering/Date/DatePart.php on line 227
[27-Oct-2022 23:09:21 Asia/Baghdad] PHP Warning:  Attempt to read property "single" on null in /home2//public_html/plugins/generic/citationStyleLanguage/lib/vendor/seboettg/citeproc-php/src/Rendering/Date/DatePart.php on line 227
1 Like

Hi @Salam_Al-Khammasi,

It looks like these are three separate issues. All three errors result from missing objects the code expects to be present.

With the first error, a current publication is not found for that submission, so you could check the database to see what might be happening there.

In the second error, a user is not found on the request, so getId() cannot be run on it. One way this can happen is if some code is being run from a CLI tool where there is not user associated with the request.

In the third error, a note is not found, and the function getAssocId() therefore cannot be run on it. You can look at line 131 in SubmissionFilesCategoryGridDataProvider.inc.php for where this happens and try and determine in the database what note might be missing.

Hope this helps.

Regards,

Erik
PKP Team

1 Like