[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[EP-tech] [Eprints 3.3.4] Plugin doesn't work on OAI-PMH push: OpenAire upgrade attempt to 3.0 compliance



Ok - the right plugin should be responding to the request.

You could also try your 'break the plugin' test, and re-run these tests - to check that you get an error when you break the plugin.
If you don't, I wonder if there is another DC_Ext somewhere (<eprints_root>/lib/plugins/EPrints/Plugin/Export/?) that *is* working.

Try adding some 'print STDERR' statements in the plugin - these should appear in the apache error log (when requested as a webpage), or in the terminal (if using a script).

Possibly change cfg.d/z_oai.pl, comment-out the 'undef' line, and add a new metadata prefix for OAI_DC_Ext.
# don't use Export::OAI_DC for oai_dc metadataPrefix...
# $c->{plugins}->{"Export::OAI_DC"}->{params}->{metadataPrefix} = undef;
# ...use Export::OAI_DC_Ext instead
$c->{plugins}->{"Export::OAI_DC_Ext"}->{params}->{metadataPrefix} = "oai_dc_ext";

When you then request http://www.fedoaempty.unina.it/cgi/oai2?verb=ListMetadataFormats it should like the new one as well as oai_dc.
If this works, try requesting the record, using 'metadataPrefix=oai_dc_ext' - see if that works!

Cheers,
John

From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Alfredo Cosco
Sent: 22 March 2017 15:04
To: eprints-tech at ecs.soton.ac.uk
Subject: Re: [EP-tech] [Eprints 3.3.4] Plugin doesn't work on OAI-PMH push: OpenAire upgrade attempt to 3.0 compliance

I checked

eprints at myhost:~/bin/local$ ./check_plugin sandbox2 Export::OAI_DC
Checking Export::OAI_DC
Plugin Export::OAI_DC seems to be OK...
Plugin Export::OAI_DC is module: EPrints::Plugin::Export::OAI_DC.
Use of uninitialized value in print at ./check_plugin line 50.
Metadata prefix: .

eprints at myhost:~/bin/local$ ./check_plugin sandbox2 Export::OAI_DC_Ext
Checking Export::OAI_DC_Ext
Plugin Export::OAI_DC_Ext seems to be OK...
Plugin Export::OAI_DC_Ext is module: EPrints::Plugin::Export::OAI_DC_Ext.
Metadata prefix: oai_dc

Seems that OAI_DC_Ext responds to the request.

Tnx,
Alfredo


2017-03-22 15:51 GMT+01:00 John Salter <J.Salter at leeds.ac.uk<mailto:J.Salter at leeds.ac.uk>>:
OK - so it looks like the plugin is loading OK.

Next, check whether the metadata prefix is correct - add this line to the end of the script (before $session->terminate).

print "Metadata prefix: ", $plugin->param( "metadataPrefix" ), ".\n";

When you run the test now, for Export::OAI_DC you should get an undefined value. For OAI_DC_Ext, you should get 'oai_dc' - as defined in the cfg.d/z_oai.pl<http://z_oai.pl> file.

If the OAI_DC plugin reports that it's metadataPrevix is also oai_dc, I think this is the problem. That plugin is responding to the request - not the OAI_DC_Ext one.

Cheers,
John

From: eprints-tech-bounces at ecs.soton.ac.uk<mailto:eprints-tech-bounces at ecs.soton.ac.uk> [mailto:eprints-tech-bounces at ecs.soton.ac.uk<mailto:eprints-tech-bounces at ecs.soton.ac.uk>] On Behalf Of Alfredo Cosco
Sent: 22 March 2017 14:22

To: eprints-tech at ecs.soton.ac.uk<mailto:eprints-tech at ecs.soton.ac.uk>
Subject: Re: [EP-tech] [Eprints 3.3.4] Plugin doesn't work on OAI-PMH push: OpenAire upgrade attempt to 3.0 compliance

Thanks John,
I launched your script, this is the result:

eprints at myhost:~/bin/local$ ./check_plugin sandbox2 Export::OAI_DC
Checking Export::OAI_DC
Plugin Export::OAI_DC seems to be OK...
Plugin Export::OAI_DC is module: EPrints::Plugin::Export::OAI_DC.

eprints at myhost:~/bin/local$ ./check_plugin sandbox2 Export::OAI_DC_Ext
Checking Export::OAI_DC_Ext
Plugin Export::OAI_DC_Ext seems to be OK...
Plugin Export::OAI_DC_Ext is module: EPrints::Plugin::Export::OAI_DC_Ext.

eprints at myhost:~/bin/local$ ./check_plugin sandbox2 Export::DC_Ext
Checking Export::DC_Ext
Plugin Export::DC_Ext seems to be OK...
Plugin Export::DC_Ext is module: EPrints::Plugin::Export::DC_Ext.

Everything seems to be OK, but It's not working.
Alfredo

2017-03-22 13:04 GMT+01:00 John Salter <J.Salter at leeds.ac.uk<mailto:J.Salter at leeds.ac.uk>>:
Have a look at this:
https://gist.github.com/jesusbagpuss/6145b93171dff32800f24750eb7fd419

It does sound like the plugin is not being loaded for some reason. This script might help locate the issue!

Cheers,
John

From: eprints-tech-bounces at ecs.soton.ac.uk<mailto:eprints-tech-bounces at ecs.soton.ac.uk> [mailto:eprints-tech-bounces at ecs.soton.ac.uk<mailto:eprints-tech-bounces at ecs.soton.ac.uk>] On Behalf Of Alfredo Cosco
Sent: 22 March 2017 11:05

To: eprints-tech at ecs.soton.ac.uk<mailto:eprints-tech at ecs.soton.ac.uk>
Subject: Re: [EP-tech] [Eprints 3.3.4] Plugin doesn't work on OAI-PMH push: OpenAire upgrade attempt to 3.0 compliance

Thank you John,
I have alredy enabled the developer mode, I'll follow your suggestions. to debug the module.

PS: Even if i comment the brackets on line 21 nothing happens.

2017-03-22 11:50 GMT+01:00 John Salter <J.Salter at leeds.ac.uk<mailto:J.Salter at leeds.ac.uk>>:
Reading this again, just commenting out that line will leave the opening bracket on line 21 - which matches the closing one on line 58 - which is a valid Perl block - so you haven't created an error!
Try commenting out line 21 as well - I think this will make an error - but the EPrints plugin system may catch this - and disable the plugin automatically.

Cheers,
John

From: eprints-tech-bounces at ecs.soton.ac.uk<mailto:eprints-tech-bounces at ecs.soton.ac.uk> [mailto:eprints-tech-bounces at ecs.soton.ac.uk<mailto:eprints-tech-bounces at ecs.soton.ac.uk>] On Behalf Of Alfredo Cosco
Sent: 22 March 2017 10:38
To: eprints-tech at ecs.soton.ac.uk<mailto:eprints-tech at ecs.soton.ac.uk>
Subject: Re: [EP-tech] [Eprints 3.3.4] Plugin doesn't work on OAI-PMH push: OpenAire upgrade attempt to 3.0 compliance

There is an other strange thing.
Even if i made a voluntary error in: https://github.com/orazionelson/openaire-compliance/blob/master/cfg/plugins/EPrints/Plugin/Export/DC_Ext.pm<https://github.com/orazionelson/openaire-compliance/blob/master/cfg/plugins/EPrints/Plugin/Export/DC_Ext.pm#L20>

e.g. comment the if statement on line 20:
#if( $eprint->exists_and_set( "eu_project" ) && $eprint->get_value( "eu_project" ) eq "yes" )

and I do NOT comment its closing bracket on line 58

I don't receive any error message on screen: where do I have to look to read errors?

Thanks,
Alfredo



2017-03-21 22:41 GMT+01:00 Alfredo Cosco <alfredo.cosco at gmail.com<mailto:alfredo.cosco at gmail.com>>:
Hello,
It was one of my first doubts.
I tried to comment the IF statement + reload configuration + restart apache

nothing happens :|

thanks,
Alfredo

2017-03-21 20:19 GMT+01:00 Alen Vodopijevec <alen at irb.hr<mailto:alen at irb.hr>>:
Hi!

Are sure that this IF statment passes?
https://github.com/orazionelson/openaire-compliance/blob/master/cfg/plugins/EPrints/Plugin/Export/DC_Ext.pm#L20

We are OpenAIRE 3.0 compliant and I will publish the code tomorrow. It's
a bit different solution but you will be able to compare the output part.

Best,
Alen


On 03/21/2017 05:56 PM, Alfredo Cosco wrote:
> Hi All,
> my organization asked me to implement OpenAire plugin:
>
> https://github.com/eprintsug/openaire-compliance
>
> then they asked me:
> 1) to upgrade the compliance to the level 2.0 or 3.0 of OpenAire Guidelines
> see:
> https://guidelines.openaire.eu/en/latest/index.html
>
> 2) to have a more user friendly interface
>
> So I forked the github repo and did it:
>
> https://github.com/orazionelson/openaire-compliance
>
> But there is a problem, everything works fine except the OAI push.
>
> I made a test archive with one record, as you can see there are the
> metadata for EU Projects:
>
> http://www.fedoaempty.unina.it/1/
>
> But if you look at OAI-PMH file EU Projects metadata are not displayed:
>
> http://www.fedoaempty.unina.it/cgi/oai2?verb=ListRecords&metadataPrefix=oai_dc&set=openaire
>
> It seems that:
> cfg/plugins/EPrints/Plugin/Export/DC_Ext.pm
>
> doesn't work ... but I don't know why and how to debug it.
>
> any help is appreciated, thanks,
> Alfredo
>
>
> ----------------------------- Upozorenje -----------------------------
>
> Automatskom detekcijom utvrdjeno je da tekst ove poruke
> podsjeca na tzv. phishing poruku.
>
> AKO SE U PORUCI TRAZI DA POSALJETE VASU IRB LOZINKU ILI
> DA UNESETE IRB PODATKE NA NAVEDENOM LINKU, RADI SE O
> NAPADU S CILJEM KRADJE I ZLOUPOTREBE PODATAKA.
>
> Centar za informatiku i racunarstvo,
> Institut Rudjer Boskovic
>
> ----------------------------- Upozorenje -----------------------------
>
>
> *** 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/
>

--
Alen Vodopijevec

Odsjek za informacijske tehnologije
Centar za znanstvene informacije
Institut Ru?er Bo?kovi?
------------------------------------------------
IT Section
Centre for Scientific Information
Rudjer Boskovic Institute
------------------------------------------------
Addr: Bijenicka cesta 54, Zagreb, HR
Email: alen at irb.hr<mailto:alen at irb.hr>
Web: www.lib.irb.hr<http://www.lib.irb.hr> | www.irb.hr<http://www.irb.hr>
Tel: + 385 1 4560 929, x1243<tel:%2B%20385%201%204560%20929%2C%20x1243>
Mob: + 385 98 584 045<tel:%2B%20385%2098%20584%20045>

Skype: vodopijevec
GTalk: alen.vodopijevec

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


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


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

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20170322/11fe7f3b/attachment-0001.html