EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #05212


< 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


Hi George,
I think you are probably on the right track that Collection.pm is causing the problem - any idea what plugin it is from (i.e. what plugins have you got installed on that server) as I don't think it's part of the core system (it's in lib/plugins/EPrints/Plugin and it doesn't exist in our 3.3.10 server installs).
Cheers,
Alan

-----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/
-- 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.