OJS 31: Error occured in citation Style Language plugin

Hi,

I have errors occurred when I use citation Style Language plugin and it doesn’t work.

When I am logged in (as Manager), I have the following error:

PHP Fatal error: Call to undefined method StageAssignmentDAO::getUser() in /aa/bb/ojs/plugins/generic/citationStyleLanguage/pages/CitationStyleLanguageHandler.inc.php on line 120, referer: http://xxx.domain/ojs/index.php/journal1/article/view/xxxx

When I am not logged in (anonymous), I have the following error:

PHP Fatal error: Call to a member function hasRole() on null in /aa/bb/ojs/plugins/generic/citationStyleLanguage/pages/CitationStyleLanguageHandler.inc.php on line 114, referer: http://xxx.domain/ojs/index.php/journal1/article/view/xxxx

And it works when in this file:

plugins/generic/citationStyleLanguage/pages/CitationStyleLanguageHandler.inc.php

I put in comments the following sections:

$user->hasRole

Thanks in advance for your help.
Best regards
Helene

Hi Helene,

Is this the same issue? Citation Style plugin throws error for all users that are not logged in · Issue #2977 · pkp/pkp-lib · GitHub

Best,
Amanda Stevens
Public Knowledge Project Team

Hi @astevens,

Yes, it’s exactly the same error. And the fix works fine for me. In which OJS version, this patch will be officially released ?

Thanks, Helene

Hi @hcl,

I’m glad that fixed the problem! If I’m understanding the Git lingo correctly, I think it’s been added to the OJS 3.1 release that can currently be downloaded, since the issue says it’s been back-ported to the OJS 3.1 master branch. In any case, it should be part of 3.1.0-1 that’s due out soon.

Best,
Amanda Stevens
Public Knowledge Project Team