[EP-tech] Large CrossRef DOI prefixes are not rendered as a linkable DOI

Adams, Thomas tadams at cshl.edu
Wed Jul 17 21:31:18 BST 2013

Using EPrints 3.3.11 and entering a CrossRef DOI prefix which contains 5 digits after the "10." does not get rendered as a DOI link, instead it appears as plain text.

For example, entering a DOI such as 10.14224/1.28376, where "14224" contains more than 4 digits, is not displayed as a DOI link to http://dx.doi.org/10.14224/1.28376

I was able to modify the sub render_possible_doi in perl_lib/EPrints/Extras.pm file to accept more digits in the DOI prefix, by adding the "+" in the regular expression.

sub render_possible_doi
        my( $session, $field, $value ) = @_;

        $value = "" unless defined $value;

        if( $value !~ /^(doi:)?10\.\d\d\d\d+\// ) { return $session->make_text( $value ); }

        $value =~ s/^doi://;

Please consider entering this bug report into your tracking database.


Tom Adams
Cold Spring Harbor Laboratory
One Bungtown Road
Cold Spring Harbor, NY 11724
Phone: +1 516-367-6898
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20130717/867dc81a/attachment-0001.html 

More information about the Eprints-tech mailing list