Activity log loading error

My school has an instance of OJS 3.1.2 and have noticed some titles fail to load the activity log. Chrome shows a console error /$$$call$$$/grid/event-log/submission-event-log-grid/fetch-grid?submissionId=7&_=1552570465045

I tried to find the matching records in the event log table but have failed to find the matching items. The submissions that fail to load usually have two reviews.

You might be falling prey to a small bug in lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php.

Can you edit that file and look around line 775 and make this change:

https://github.com/pkp/pkp-lib/blob/master/classes/submission/SubmissionFileDAO.inc.php#L774

Note, that the code I am including is against OJS 3.1.2. You have PKPSubmissionFileDAO.inc.php instead.

Cheers,
Jason

Hi Jason,

Thank you, I’ve updated the code but continue to get the error for certain submissions. Edge just mentions the error above but chrome also shows a
Uncaught TypeError: Cannot read property ‘focus’ of null
at s.resetFocusInfoCenter (build.js:1)
at ModalHandler.js:257
error.

Nick

Hi Nick,

That browser error is probably unrelated, but there might be more details in your server error log, when you attempt to load the activity log. Do you mind taking a look?

Thanks,
Jason

Hi Jason,

I’m sorrry for the format but here is a look at the apache error log.

[Fri Mar 15 13:45:36.660735 2019] [php7:error] [pid 29408] [client 150.216.60.61:50382] PHP Fatal error:  Uncaught Error: Call to a member function getFullName() on null in /var/www/ojsproduction/lib/pkp/classes/user/UserDAO.inc.php:465\nStack trace:\n
#0 /var/www/ojsproduction/lib/pkp/classes/log/EmailLogEntry.inc.php(129): UserDAO->getUserFullName('0', true)\n
#1 /var/www/ojsproduction/lib/pkp/controllers/grid/eventLog/EventLogGridCellProvider.inc.php(96): EmailLogEntry->getSenderFullName()\n
#2 /var/www/ojsproduction/lib/pkp/classes/controllers/grid/GridCellProvider.inc.php(49): EventLogGridCellProvider->getTemplateVarsFromRowColumn(Object(EventLogGridRow), Object(GridColumn))\n
#3 /var/www/ojsproduction/lib/pkp/classes/controllers/grid/GridHandler.inc.php(1098): GridCellProvider->render(Object(Request), Object(EventLogGridRow), Object(GridColumn))\n
#4 /var/www/ojsproduction/lib/pkp/classes/controllers/grid/GridHandler.inc.php(1005): GridHandler->_renderCellInternally(Object(Request), Object(EventLogGridRow), Object(GridColumn))\n
#5 /var/www/ojsproduction/lib/pkp/classes/controllers/grid/GridHandler.inc.php(982): GridHan in /var/www/ojsproduction/lib/pkp/classes/user/UserDAO.inc.php on line 465, referer: http://tpre.ecu.edu/index.php/tpre/submissions
[Fri Mar 15 13:53:01.641678 2019] [php7:warn] [pid 29417] [client 75.110.74.238:57968] PHP Warning:  Declaration of ReviewerReviewFilesGridDataProvider::loadData() should be compatible with ReviewGridDataProvider::loadData($filter = Array) in /var/www/ojsproduction/lib/pkp/controllers/grid/files/review/ReviewerReviewFilesGridDataProvider.inc.php on line 18, referer: http://tpre.ecu.edu/index.php/tpre/reviewer/submission/7

Hey @criminal

It looks like there is an email log entry that originally had a user associated with it, and then that user was either deleted or merged into another user, and the email log entry was never cleaned up.

Did you upgrade from an older version to 3.1.2? Did everything go smoothly with the upgrade?

Cheers,

Hi Jason,

Thank you. The email log had about eight items with a sender_id of zero. I upgraded the server twice and thought both were successful but something must have corrupted the log file.

The activity log is now loading as expected.

Thank you,
Nick

1 Like

Dear,
In OJS 3.2
The Activity log of articles in Copyediting & Production Stage was not loading, got below error:

[23-Mar-2019 14:49:30 Asia/Kolkata] PHP Fatal error: Uncaught Error: Call to a member function getFullName() on null in /public_html/journals/lib/pkp/classes/user/UserDAO.inc.php:465
Stack trace:
#0 /public_html/journals/lib/pkp/classes/log/EmailLogEntry.inc.php(129): UserDAO->getUserFullName(‘0’, true)
#1 /public_html/journals/lib/pkp/controllers/grid/eventLog/EventLogGridCellProvider.inc.php(96): EmailLogEntry->getSenderFullName()
#2 /public_html/journals/lib/pkp/classes/controllers/grid/GridCellProvider.inc.php(49): EventLogGridCellProvider->getTemplateVarsFromRowColumn(Object(EventLogGridRow), Object(GridColumn))
#3 /public_html/journals/lib/pkp/classes/controllers/grid/GridHandler.inc.php(1098): GridCellProvider->render(Object(Request), Object(EventLogGridRow), Object(GridColumn))
#4 /public_html/journals/lib/pkp/classes/controllers/grid/GridHandler.inc.php(1005): GridHandler->_renderCellInternally(Object(Request), Object(EventLogGridRow), Object(GridColumn))
#5 /public_html/journals/lib/pkp/classes/user/UserDAO.inc.php on line 465

Hi there,

Please apply this patch to your installation:

https://github.com/pkp/pkp-lib/commit/1b5d4239852ff376638339025ff7af523b4441cc

Cheers,
Jason

1 Like

I want to apply this patch but in /lib/pkp/classes/user folder there isn’t any UserDAO.inc.php file. Can the name of the file be PKPUserDAO.inc.php?

Hi @ikram

Are you running OJS 3.1.2? That patch is for 3.1.2.

Regards,
Jason

My OJS version is 3.1.1.4 I received an error message like “Usage statistics file loader task - 5c9aae26cc14c - Error

How can I solve this? Also my error log is 345 MB and I think most of them are cosmetics but error log file is very large.

Hi @ikram,

Oh. I think you jumped into this thread with a different question. This patch isn’t for the usage stats plugin. You can just look at the very end of your log file to get the specific error for this when you generate the plugin. Also, you could talk to your systems admin to configure log rotation so your logs do not get so big.

Regards,
Jason

Ooo sorry I joined wrong title.

I am facing the same issue, (activity log was not loading for some articles) I came across this patch you mentioned… Can you guide me how do I use a patch for my ojs, because I have never used any patch. (I always upgraded by using complete source)…
I shall be grateful to you.
Regards,

Hi @Farhan_Abbas

If you’re not using git to manage your installation you can always get the “diff” version of the fix with this URL here:

https://github.com/pkp/pkp-lib/commit/1b5d4239852ff376638339025ff7af523b4441cc.diff

And from there just make those few small changes to the file specified. + lines go in, - lines come out.

Cheers,
Jason

I just found the same problem on 3.1.1.4
and it’s solved

thank you @criminal and @jnugent

image