We just upgraded our OJS installation from 2.3.6 to 2.4.0. One of our users (author of a submitted article that is being reviewed) just noticed that when she clicked on a direct link to the article review page did not do anything, if she was not logged in. The link was .../author/submissionReview/937. In previous version, such a direct link would redirect to the login page, if user was not logged in.
I have checked the server error log and found this:
PHP Fatal error: Call to a member function getId() on a non-object in /var/www/html/ojs/pages/author/AuthorHandler.inc.php on line 135
I looked at the above file and found this line in the function validate:
- Code: Select all
if ($authorSubmission->getUserId() != $user->getId()) {
but I don't have a clue why it fails. If I remember correctly the getId() function was introduced in 2.4.0, so maybe it's not called correctly here.
However, I then tried to revert the function validate in the /pages/author/AuthorHandler.inc.php to the 2.3.6 version, and the redirection worked as before, but the article page didn't show up at all, and failed with two different PHP errors.
So now I restored the AuthorHandler.inc.php from 2.4.0 version, but I would very much like to resolve the issue with failing redirection to login when user is not logged in. This scenario is common for our journal, because the user clicks on a link in the email from the editor, but then they are confused because they end up with a blank page or an error.
With kind regards,
Ales
