EPrints Technical Mailing List Archive
Message: #05213
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: EPrints breaks when a deposit is retired
- To: "eprints-tech@ecs.soton.ac.uk" <eprints-tech@ecs.soton.ac.uk>
- Subject: [EP-tech] Re: EPrints breaks when a deposit is retired
- From: "Alan.Stiles" <alan.stiles@open.ac.uk>
- Date: Wed, 2 Dec 2015 11:59:46 +0000
Okay, so ignore my email in favour of this one from John! General question to the list - Any particular reason that this plugin has the .pm file in the root plugin folder? It's the only one I've seen where the .pm is here rather than in a lower collection like Import, Export, Event or Screen. Is it because it doesn't fit at a lower level or due to some subsequent coding standard being implemented? (or option C?) Cheers, Alan -----Original Message----- From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of John Salter Sent: 02 December 2015 11:30 To: 'eprints-tech@ecs.soton.ac.uk' <eprints-tech@ecs.soton.ac.uk> Subject: [EP-tech] Re: EPrints breaks when a deposit is retired Hi, I think Collection.pm will be the one! I'm guessing that it's from: http://bazaar.eprints.org/226/ I think the best example of the newer threading is in the ~/archives/ARCHIVEID/cfg/cfg.d/eprint_render.pl - take a look at the 'has_multiple_versions' stuff. I suspect the 'replacedby' reference should be updated to something along these lines... Cheers, John -----Original Message----- From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of George Mamalakis Sent: 02 December 2015 11:10 To: eprints-tech@ecs.soton.ac.uk Subject: [EP-tech] Re: EPrints breaks when a deposit is retired Hi John! Greping replacedby within my repo returned nothing (eg grep -R replacedby ~eprints/archives/myrepo), and only returned some entries in the following directories: # grep -nR replacedby lib/ lib/plugins/EPrints/Plugin/Collection.pm:115: $self->get_value( "replacedby" ) ); lib/lang/en/phrases/system.xml:2440: <epp:phrase id="eprint_fieldname_replacedby">Replaced by</epp:phrase> lib/lang/el/phrases/system.xml:2446: <epp:phrase id="eprint_fieldname_replacedby">Αντικαταστάθηκε από</epp:phrase> # grep -nR replacedby perl_lib/ perl_lib/EPrints/DataObj/EPrint.pm:1527: elsif( $self->{dataset}->has_field( "replacedby" ) && $self->is_set( "replacedby" ) ) ##backward compatibility for repository upgraded from older version, which had replacedby. perl_lib/EPrints/DataObj/EPrint.pm:1529: $replacement = $self->{session}->eprint( $self->value( "replacedby" ) ); # grep -nR replacedby tools/ tools/upgrade:155: * Alter the columns "commentary", "replacedby" and "succeeds" in the tools/upgrade:196: $sql = "SELECT eprintid,succeeds,replacedby,commentary FROM ". tools/upgrade:203: print VDUMP "eprintid,succeeds,replacedby,commentary\n"; tools/upgrade:217: foreach my $col_id ( "succeeds","replacedby","commentary" ) tools/upgrade:479: foreach( @epds ) { add_single_field_after( $db, $_,"metadata_visibility","VARCHAR(255) DEFAULT 'show'","replacedby" ); } And as you can see, nothing else: # grep -nR replacedby bin # grep -nR replacedby var # grep -nR replacedby licenses/ # grep -nR replacedby tests # grep -nR replacedby cgi If I understood correctly Collections.pm seems to be the one that causes the problem in the example I gave you, and as I see it, the problem does not seem to be related to my repo's config. I cannot try it in a clean install because other people are working in my current image right now and I cannot save its state and load a clean one, but I think that a clean repo with the test data installed would be sufficient for anybody to reproduce. Thanks again for the help! George. On 02/12/2015 12:23 μμ, John Salter wrote: > ...also, the 'replacedby' reference could be in ~/lib/plugins/... > > If the code came from a plugin installed from the bazaar/files.eprints.org, or an example on the wiki, we should correct it... > > Cheers, > John > > > -----Original Message----- > From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of John Salter > Sent: 02 December 2015 10:11 > To: 'eprints-tech@ecs.soton.ac.uk' > Subject: [EP-tech] Re: EPrints breaks when a deposit is retired > > Hi George, > Somewhere in the config if your repository (~/archives/ARCHIVEID/cfg/...) there will be a reference to 'replacedby'. > > There used to be two fields that EPrints used to 'thread' eprints together* - 'succeeds' and 'replacedby'. > This was changed at some point, and just the 'succeeds' field is used now. > > When you can find the reference to 'replacedby', try and work out what it's trying to do (we can help :o). > It may just be a case of taking out that block of code - if EPrints 3.3.14 is handling the threads OK with the 'succeeds' field. > > Cheers, > John > > * see e.g. http://bazaar.eprints.org/278/ - and the 'other versions' at the bottom of the page. > > -----Original Message----- > From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of George Mamalakis > Sent: 02 December 2015 09:51 > To: eprints-tech@ecs.soton.ac.uk > Subject: [EP-tech] EPrints breaks when a deposit is retired > > Hello everybody, > > As mentioned in the subject of this email, in EPrints 3.3.14 I tried to > retire a deposit (without knowing what it exactly does) and after > pressing the retire button from the action's menu, I got the error: > > EPrints System Error > > Attempt to get value from not existent field: eprint/replacedby > > Looking the apache's error log, I saw: > > ------------------------------------------------------------------ > ---------------- EPrints System Error ---------------------------- > ------------------------------------------------------------------ > Attempt to get value from not existent field: eprint/replacedby > ------------------------------------------------------------------ > at /usr/share/eprints3/perl_lib/EPrints/DataObj.pm line 702. > EPrints::DataObj::get_value(EPrints::DataObj::EPrint=HASH(0x7fc9323a2138), > "replacedby") called at > /usr/share/eprints3/lib/plugins/EPrints/Plugin/Collection.pm line 113 > EPrints::DataObj::EPrint::render(EPrints::DataObj::EPrint=HASH(0x7fc9323a2138), > 1) called at: > /usr/share/eprints3/perl_lib/EPrints/DataObj/EPrint.pm line 1499 > EPrints::DataObj::EPrint::render_preview(EPrints::DataObj::EPrint=HASH(0x7fc9323a2138)) > called at > /usr/share/eprints3/perl_lib/EPrints/Plugin/Screen/EPrint/Summary.pm line 40 > EPrints::Plugin::Screen::EPrint::Summary::render(EPrints::Plugin::Screen::EPrint::Summary=HASH(0x7fc93238cb80), > "ep_eprint_view_0") called at > /usr/share/eprints3/perl_lib/EPrints/Plugin/Screen/EPrint/View.pm line 188 > EPrints::Plugin::Screen::EPrint::View::render(EPrints::Plugin::Screen::EPrint::View=HASH(0x7fc9323a3388)) > called at /usr/share/eprints3/perl_lib/EPrints/ScreenProcessor.pm line 377 > EPrints::ScreenProcessor::process("EPrints::ScreenProcessor", "session", > EPrints::Repository=HASH(0x7fc93233e098), "template", undef, "url", > "/cgi/users/home") called at /usr/share/eprints3/cgi/users/home line 25 > ModPerl::ROOT::ModPerl::Registry::usr_share_eprints3_cgi_users_home::handler(Apache2::RequestRec=SCALAR(0x7fc931f7d1c0)) > called at /usr/lib/x86_64-linux-gnu/perl5/5.20/ModPerl/RegistryCooker.pm > line 207 > eval {...} called at > /usr/lib/x86_64-linux-gnu/perl5/5.20/ModPerl/RegistryCooker.pm line 207 > ModPerl::RegistryCooker::run(ModPerl::Registry=HASH(0x7fc932305a40)) > called at /usr/lib/x86_64-linux-gnu/perl5/5.20/ModPerl/RegistryCooker.pm > line 173 > ModPerl::RegistryCooker::default_handler(ModPerl::Registry=HASH(0x7fc932305a40)) > called at /usr/lib/x86_64-linux-gnu/perl5/5.20/ModPerl/Registry.pm line 32 > ModPerl::Registry::handler("ModPerl::Registry", > Apache2::RequestRec=SCALAR(0x7fc931f7d1c0)) called at -e line 0 > eval {...} called at -e line 0 > [Wed Dec 02 10:55:58.336760 2015] [:error] [pid 21450] EPrints::abort()\n > > In this state, from the web interface I am not able to delete it (delete > is not found in the available options), so I have to remove the item > using a script. > > It doesn't seem to be a problem with my installation, and it's easy to > reproduce, so I assume it should be reported to eprints-github once it > is confirmed by someone else as well. > > Thanks all in advance, > > George. > -- George Mamalakis IT and Security Officer, Electrical and Computer Engineer (Aristotle Univ. of Thessaloniki), PhD (Aristotle Univ. of Thessaloniki), MSc (Imperial College of London) School of Electrical and Computer Engineering Aristotle University of Thessaloniki phone number : +30 (2310) 994379 *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/ *** EPrints developers Forum: http://forum.eprints.org/ *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: http://www.eprints.org/tech.php/ *** EPrints community wiki: http://wiki.eprints.org/ *** EPrints developers Forum: http://forum.eprints.org/ -- The Open University is incorporated by Royal Charter (RC 000391), an exempt charity in England & Wales and a charity registered in Scotland (SC 038302). The Open University is authorised and regulated by the Financial Conduct Authority.
- References:
- [EP-tech] EPrints breaks when a deposit is retired
- From: George Mamalakis <mamalos@eng.auth.gr>
- [EP-tech] Re: EPrints breaks when a deposit is retired
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Re: EPrints breaks when a deposit is retired
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] Re: EPrints breaks when a deposit is retired
- From: George Mamalakis <mamalos@eng.auth.gr>
- [EP-tech] Re: EPrints breaks when a deposit is retired
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] EPrints breaks when a deposit is retired
- Prev by Date: [EP-tech] Re: EPrints breaks when a deposit is retired
- Next by Date: [EP-tech] Re: EPrints breaks when a deposit is retired
- Previous by thread: [EP-tech] Re: EPrints breaks when a deposit is retired
- Next by thread: [EP-tech] Re: EPrints breaks when a deposit is retired
- Index(es):