Bug 8747 - Fatal error: Call to a member function getId() on a non-object in /home/ilunis/public_html/ojs/classes/notification/NotificationManager.inc.php on line 121
Fatal error: Call to a member function getId() on a non-object in /home/iluni...
Status: NEW
Product: OJS
Classification: Unclassified
Component: Reviewers
2.4.x
All All
: P3 normal
Assigned To: PKP Support
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-05-12 12:35 PDT by pmarques
Modified: 2014-05-26 08:04 PDT (History)
2 users (show)

See Also:
Version Reported In:
Also Affects:


Attachments
Print Screen with descriptions of the bug (287.94 KB, application/pdf)
2014-05-12 12:35 PDT, pmarques
Details
The mail the reviewer received (83.97 KB, image/png)
2014-05-25 09:52 PDT, pmarques
Details
After clicking on the 'Submission url' (106.02 KB, image/png)
2014-05-25 10:00 PDT, pmarques
Details

Note You need to log in before you can comment on or make changes to this bug.
Description pmarques 2014-05-12 12:35:32 PDT
Created attachment 4019 [details]
Print Screen with descriptions of the bug

Greatings,

We're a group of scholars who are trying to create a journal using OJS, so we are testing it so we can understand how it works and detect eventual problems.
This one came out when we were testing a submission made by a reviewer.

Fatal error: Call to a member function getId() on a non-object in
/home/ilunis/public_html/ojs/classes/notification/NotificationManager.inc.php on line 121

It's somehow rather strange because, if the reviewer ignore this error message, he will see that his submission has been entered in the system.
However, he will probably believe that his revision was not recorded and will submit it over and over again.
It's all explained in the attachment I send with this message containing a print screen of the errors.

I will be very grateful for all the help I can get concerning this bug.

Best regards,
Pedro Marques
Comment 1 Alec Smecher 2014-05-12 12:41:33 PDT
Pedro, what version of OJS are you using?
Comment 2 pmarques 2014-05-12 14:16:58 PDT
(In reply to Alec Smecher from comment #1)
> Pedro, what version of OJS are you using?

Hi Alec, I'm using the previous version - 2.4.3
But this error ocurred for the first time before the latest version (2.4.4) was available.
I don't know if that's important.

Thanks,
Pedro
Comment 3 Alec Smecher 2014-05-12 14:35:23 PDT
Pedro, can you verify that line 121 of classes/notification/NotificationManager.inc.php reads...

$userId = $user->getId();

Are there any modifications to your installation?

Are you using one-click reviewer access (configured in Journal Setup)?
Comment 4 pmarques 2014-05-13 09:43:57 PDT
(In reply to Alec Smecher from comment #3)
> Pedro, can you verify that line 121 of
> classes/notification/NotificationManager.inc.php reads...
> 
> $userId = $user->getId();
> 
> Are there any modifications to your installation?
> 
> Are you using one-click reviewer access (configured in Journal Setup)?

Hi Alec, yes I'm using the option «Enable one-click reviewer access».
As for the question about the line 121 I'll have to talk with our computer programmer because I don't know much about that specific subject.
I'll reach you back as soon as I have an answer from him, is that ok with you?

Many thanks,
Pedro
Comment 5 Alec Smecher 2014-05-13 11:30:09 PDT
That's OK, Pedro, I think I have enough information to debug this now. Stay tuned for a fix.
Comment 6 Alec Smecher 2014-05-13 11:43:17 PDT
Sorry, Pedro, I'm not able to duplicate this behavior locally.

The best way to do this would be to...
- Send a snapshot of your database. (You can email this to me directly, though you may need the assistance of your host to get the database dump if you're not sure how to do it or don't have the tools. Note that it may contain private information, so be sure not to post it publicly.)
- Send step-by-step instructions on how to duplicate the error message. For example, what user account to use, what links to click, etc.
Comment 7 pmarques 2014-05-25 09:52:08 PDT
Created attachment 4030 [details]
The mail the reviewer received
Comment 8 pmarques 2014-05-25 10:00:28 PDT
Created attachment 4031 [details]
After clicking on the 'Submission url'

Hi Alec,

We tried several things and maybe we found the problem:

When the reviewer receives the invitation mail to review a paper from an editor, the reviewer clicks on the link in the mail and is redirected to a page on the Journal site -but he is not logged in- (see at the top right, if logged in, his login would be written) and he is not requested to log in.

-> If he accepts to review without loggin in, then he clicks on 'Review', the error occurs.

-> If instead he logs in first then comes back to this page and accepts then clicks on 'Review', no error, the process can be finished correctly.

I think the reviewer should be asked to log in automatically.

I attached two images : the mail the reviewer received (in fact, I'm Brad Pitt), I clicked on the 'Submission url' and was redirected to the page on the second image. You can see this is clearly dedicated to the reviewer but he is not logged in nor requested to do so.

This may not be normal and it can be the bug in OJS.
I would appreciate if you could confirm this information and do something to solve the problem (if really this is its origin).

Many thanks,
Pedro Marques
Comment 9 Alec Smecher 2014-05-26 08:04:37 PDT
Pedro, I can't debug this specifically without being able to duplicate the problem, which I haven't been able to reproduce locally. However, if you want reviewers to be required to log in, you can disable the "one click reviewer access" feature mentioned above; this is what is causing reviewers to be able to access the review process without logging in.