OJS Fatal error: Call to a member function getRoleId()

Hello:

I have been using OJS 2.4.2 for over 2 years without a problem till today. This error is the same as described here https://pkp.sfu.ca/support/forum/viewtopic.php?t=9542. I applied the fix described on that page, but that did not solve the problem.

I use one-click review submission. When a reviewer try to edit one’s comments, he got this error:

Fatal error: Call to a member function getRoleId() on a non-object in /home/xxx/public_html/classes/submission/form/comment/EditCommentForm.inc.php on line 41

when try to delete comments, the error message is:
Fatal error: Call to a member function getCommentType() on a non-object in /home/xxx/public_html/pages/reviewer/SubmissionCommentsHandler.inc.php on line 135

This did not happen before (or we did not notice it, I am not suer). Please help, otherwise, the system stops function.

Thank you so much!

Eric

Hi @newbies,

I’d suggest upgrading to the latest 2.4.x release – currently OJS 2.4.8-1. There are a few related bugs that have been patched, and upgrading is a good idea anyway. I suspect that will solve the problem.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

Thank you for reply. The problem is that my version has been modified in both code and templates, even applying patches has difficulties. I am considering updating to 3.0 in a few month since the upgrade would need a lot of template work. I just hope that I can solve the editing comments issue for the time being.

Hi @newbies,

Another work-around that would potentially fix the issue would be to disable one-click reviewer access. If I recall correctly, the problem is limited to that feature.

Regards,
Alec Smecher
Public Knowledge Project Team