-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Check for free_to_read causes EPrint::View not to load #28
Comments
This may be due to using an earlier version of the RIOXX2 plugin that did not set this field to a sensible value when the plugin was installed and created this field in the eprint table. However, it would be helpful if the check for whether free_to_read is set is a little more fault tolerant, so whatever teh sate of the field it doesn't cause the EPrint::View screen plugin to fail to load. |
I have used the following few lines as a catch for when this value is not properly set, prior to the unless( EPrints::Utils::is_set( $value->{free_to_read} ) ) line: if ( ref($value) ne 'HASH' ) |
Pull request please? Tim Timothy Miles-Board Web & Repositories Development Specialist, University of London Computer Centre 020 7863 1342 | 07742 970 351 | [email protected]:[email protected] | @drtjmb The University of London is an exempt charity in England and Wales From: David R Newman [email protected] I have used the following few lines as a catch for when this value is not properly set, prior to the unless( EPrints::Utils::is_set( $value->{free_to_read} ) ) line: if ( ref($value) ne 'HASH' ) Reply to this email directly or view it on GitHubhttps://github.com//issues/28#issuecomment-106819627. |
Addresses eprintsug#28 Probably due to pre-RIOXX2 eprints that have had embargoes that have expired.
On line 594 of zz_rioxx2.pl the following line causes the EPrints::View Screen plugin to fail to load for EPrint records that were created and have not been edited since the RIOXX2 plugin was installed:
unless( EPrints::Utils::is_set( $value->{free_to_read} ) )
The following error message is shown when the page fails to load is:
Can't use string ("0") as a HASH ref while "strict refs" in use at (eval 2377) line 594.
Suggesting that either $value is not defined as a HASH.
The text was updated successfully, but these errors were encountered: