Notifications: Uncaught Error: Call to a member function getLocalizedTitle() on null

I am running OJS 3.3.0.7 on Ubuntu 20.04 with MariaDB. When I click on the Notification icon to list the notifications I get
PHP Fatal error: Uncaught Error: Call to a member function getLocalizedTitle() on null in /lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php:98

Any suggestions where I can start from looking?

Thank you in advance.

Nason

I did some more hunting and when I comment out
return $submissionDao->getById($queuedPayment->getAssocId())->getLocalizedTitle();
in lib/pkp/controllers/grid/notifications/NotificationsGridCellProvider.inc.php on line 98 I get the notifications without any issue.

Can someone please advise what is going on here because believe it is a data issue but I don’t how to identify the offending rows in the database so that I can delete them.

Thank you in advance
Nason

Hi @Nason_Bimbe,

It looks like it’s a data problem related to one of the queued payments.
Can you debug it but dumping the data about the payment in to the log, e.g., after the line

 if ($queuedPayment) {

place

error_log($queuedPayment->getId())

After reproducing the error look into the log to see which payment causes the problem. Then you’ll be able to find in the database by executing the query:

SELECT payment_data FROM queued_payments WHERE queued_payment_id = 100

where 100 is the ID of the payment which causes the problem.

The best would be to debug the problem locally (from a copy of the production instance).

Thanks @Vitaliy I managed to sort it.

I did add the entry to log the offending queued payment and having got the ID, I checked the queued_payments table where I found the entry was related to a non existing submission.

I delete the entry from the queued_payments table and all is well now.

1 Like