Task Notification Error

Our JM/editor is having an issue with the notification area. The task notification area shows there are 8 tasks, but when the user clicks on the link the pop-down is just blank. The task notification area works fine for me, but when I login as this user, I see the problem they describe. We are running OJS 3.1.0. Here is the PHP error related to this issue:

[Mon Apr 09 14:14:53.657934 2018] [:error] [pid 26835] [client {IP}] PHP Fatal error: Call to a member function getFullName() on null in /{site root}/lib/pkp/classes/notification/managerDelegate/QueryNotificationManager.inc.php on line 68, referer: https://{site}/manageIssues

I checked the database and every user has a first and last name. Any help would be appreciated. Thanks!

This is what it looks like in the GUI:

Hi @jbutler,

You have a data inconsistency – your database contains a note that refers to a non-existent user as its author. Try the following SQL query:

SELECT n.note_id FROM notes n LEFT JOIN users u ON (n.user_id = u.user_id) WHERE u.user_id IS NULL;

Any results listed show notes that are missing authors. If you do see any listed, you’ll need to delete them – and it would be helpful if you have some idea of how those got created, as it’s possible that we’re missing data cleanup somewhere in the system.

Alec Smecher
Public Knowledge Project Team

Thanks @asmecher,
It looks like a little less than half of the notes (over 1,000) were listed with a user_id of 0. I removed them and now when I run your script it comes back with 0 rows. Unfortunately the tasks GUI pop-down is still blank and I now see a new slightly modified PHP error:

PHP Fatal error: Call to a member function getUser() on null in /{siteroot}/lib/pkp/classes/notification/managerDelegate/QueryNotificationManager.inc.php on line 65, referer: https://{site}/manageIssues

As for the cause, the bad rows had creation dates that were the full range of the journals lifetime, but the modified dates were all the exact day and time of the upgrade to 3.1.0.


Just checking on this, any thoughts.

I have the same issue with my task notification. Is there a way to fix this?Task_notification



SELECT nt.note_id, nt.user_id FROM notifications n JOIN queries q ON (n.assoc_type = 1048586 AND n.assoc_id = q.query_id) JOIN notes nt ON (nt.assoc_type = 1048586 AND nt.assoc_id = q.query_id) LEFT JOIN users u ON (nt.user_id = u.user_id) WHERE u.user_id IS NULL;

All note_id needs user_id, so assing user_id. I assigned the user_id that I didn’t see the notifications

Hope you help someone else. Regards!
Elena Cruz.

1 Like

This topic was automatically closed after 4 days. New replies are no longer allowed.