Problem with Crossref Export/ Registration plugin in OJS 2.4.8.1

Hi,

SInce we upgraded to OJS 2.4.8.1 we are having problems with the crossref plugin. Any time we click on ‘manage doi’s’ we get an http 500 Internal Server Error.

kind regards,
Paul

Follow the instructions here to find the error message, and post that here.

An quick guess would be to check to see if the symbolic links which are used by the CrossRef plugin are broken. This can easily happen if you extract or git clone the files on a Windows workstation and then copy the folder to Linux server, for example. If the files DOIExportPlugin.inc.php contain filenames instead of link to the actual file content, this will be the issue.

this is the error message in the webserver error.log:

PHP Fatal error: Using $this when not in object context in /opt/ojs/plugins/importexport/crossref/CrossRefExportPlugin.inc.php on line 220

Got it. You’re encountering this bug, which is related to very old versions of PHP:
https://github.com/pkp/pkp-lib/issues/1749

There is a fix attached to the issue as a pull request, if you are comfortable patching your system.

Alternately, you could update your PHP version to something a bit more modern, such as PHP 5.3.3, or 5.4.

1 Like

Thanks! The fix solved the problem.
Fyi: we are running php 5.3.3

Hmmm… yes, it looks like the anonymous function is supported in 5.3.3, but the inheritance of the the object scope for the function call of $this->canBeExported() is not? I think this fix also may introduce a problem for plugins such as EZID which derive from this class. The use of canBeExported() is the better call. Glad this is working for you, and glad you got me looking further at the code. I think some additional improvements are due.

1 Like