Update only Crossref plugin in OJS 2.4.5.0

Hi,

Crossref has set a new rule for DOI links, which now have to point to article’s full text instead of abstract.

I hope latest version of Crossref plugin includes the modifications to comply with this new rule. I can not update the whole system to 2.4.8.1 because I made earlier some modifications to core files, which I want to preserve. Anyways we will move to OJS3 in close future.

Can anyone give me short steps how to update the Crossref plugin in on OJS 2.4.5.0. or give me the code to modify some file in Crossref plugin, to comply with their new rule above?

Thank you.
Kind regards,
Dijana

Hi @dijana,

See e.g. this other thread on the subject. We’ll have an update in place before the CrossRef deadline – but you’ll have to upgrade to a newer release of OJS (which is probably a good idea anyway).

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Actually, this is different request from Crossref, for which the deadline is 31 December. They ask us to update the metadata URLs so they point directly to Full text (PDF or HTML), not to an abstract.

Is this already implemented in latest OJS2 Crossref plugin?
If yes, where can I download the latest Crossref plugin, and I can update by uploading it into the Plugin settings in OJS2?

Thanks asmecher!
Dijana

Hi Dijana,

James here. I’ve been coordinating the Crossref implementation with the PKP developers and Crossref themselves. If memory serves we updated how the metadata URLs worked in OJS 2.4.6 or so - I honestly can’t remember the exact time, but as far as I know the most recent versions of the files are fully compliant. We’ve also resolved the display issue Alec mentions above in the most recent code, which has not yet been released in a simple download package.

Getting the code is a little difficult. The Crossref plugin hasn’t (yet) been moved to its own repository, so it can’t (yet) be downloaded individually. If you are comfortable with FTP or SSH, what you can do is download the entire “stable” OJS 2.4.8 branch here; delete the old files from the plugins/importexport/crossref/ directory on your server; and upload the files from the download package. That should provide you with the most recent files you’ll need.

IMPORTANT NOTE: the Crossref plugin relies on the Datacite plugin (also in plugins/importexport/) as a dependency, and you will have to do the same steps as above for it as well. So basically, just replace those two with the most recent code from the stable branch on Github.

Generally speaking though, it would be best if you can get your code into a state where you can upgrade the entire system.

Cheers,
James

Hi James,

Thank you so much for your help. I downloaded the files as advised, and after updating the plugin files over FTP, i got this error when tried to access the Import/Export plugins in OJS, as a Journal Manager:

Fatal error: Cannot redeclare class DataciteExportPlugin in …/ojs/plugins/importexport/datacite/DataciteExportPlugin.inc.php on line 415

Any idea?
Thanks
Dijana

@jmacgreg, to clarify, when you describe updating the metadata URLs to include the links to the full text, if I understand this correctly, this was the addition of the collection elements under the doi_data element, which each collection pointing to a galley. The actual doi_data resource URL still points to the abstract landing page.

(As a developer’s aside, this may cause a problem if the abstract landing page is suppressed, c.f. Article summary page link from TOC - #9 by boockmi)

@dijana, this message “Cannot redeclare class DataciteExportPlugin” indicates that you have two files which contain the line “class DataciteExportPlugin extends DOIExportPlugin {”. Did you first fully remove both the crossref and the datacite directories before replacing them with the updated versions? If you have duplicated files this could cause the problem. Are all the tools you used for extracting the files from the archive and for transferring the files on the server aware of symbolic links? If the symlinks which point from files in plugins/importexport/crossref/classes/ to …/…/datacite/classes/ are inconsistent, this could cause the problem.

Hi @ctgraham, yep, that is correct.

J

Hi @ctgraham,

I downloaded files from PKP git repositiry, stable branch 2.5.8.0, with SourceTree software, and then uploaded them to m server with SmartFTP.

I didn’t delete, but changed the names of the old crossref and datacite folders, in case I need them to revert changes, but this was causing the foremerly described error. After removal of old folders and uploading new ones, I get another error when trying to access the crossref plugin:

./…/…/datacite/classes/form/DOIExportSettingsForm.inc.php
Fatal error: Class ‘DOIExportSettingsForm’ not found in …/importexport/crossref/classes/form/CrossRefSettingsForm.inc.php on line 21

Dijana

The error “Class ‘DOIExportSettingsForm’ not found” sounds suspiciously like a symbolic link problem. Check the file plugins/importexport/crossref/classes/form/DOIExportSettingsForm.inc.php. Is it a valid symbolic link to the form in the datacite folder? Alternately, is it a copy of the same?