EPrints Technical Mailing List Archive

Message: #06376


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

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


Yes, thanks again for the suggestions and for the debugging "step by step" process, useful for future jobs.
Regards,
Alfredo

2017-03-22 22:47 GMT+01:00 John Salter <J.Salter@leeds.ac.uk>:

Yay! Glad we got there in the end!


My approach to this would have been slightly different. 

I would have used the plugin alias technique (see: https://github.com/eprints/eprints/blob/3.3/lib/defaultcfg/cfg.d/plugins.pl#L46-L54) to get the new plugin to respond where the old one would normally respond.


If the new plugin will be used by multiple archives, create it in lib/plugins/.

If it will be used by one archive, but under an EPrints install that runs multiple archives, I'd add the archiveid to the package name e.g. EPrints::Plugin::Export::Fedoa_OAI_DC.


The plugin alias would then look like (e.g. in z_oai.pl):

# make the new plugin respond where the OAI_DC plugin would normally respond
$c->{plugin_alias_map}->{"Export::OAI_DC"} = "Export::Fedoa_OAI_DC";
# 'hide' the new plugin - so it doesn't appear as an alternative to the overloaded plugin
$c->{plugin_alias_map}->{"Export::Fedoa_OAI_DC"} = undef;

The config above would map the alias the plugin only for the archive with this config applied.

As always, there are many ways to do things - I'm not suggesting my approach is better - just a different way of achieving the same thing.


I hope the process of debugging was useful - I find this type of thing really good to help understand how the software works!


Cheers,

John




From: eprints-tech-bounces@ecs.soton.ac.uk <eprints-tech-bounces@ecs.soton.ac.uk> on behalf of Alfredo Cosco <alfredo.cosco@gmail.com>
Sent: 22 March 2017 18:16:55
To: eprints-tech@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
 

If you don't, I wonder if there is another DC_Ext somewhere (<eprints_root>/lib/plugins/EPrints/Plugin/Export/?) that *is* working.


EUREKA!
There was the old OpenAire plug-in working with the same name in on an other archive, I couldn't imagine it was able to affect all other instances.

I changed the plugin name and everything works well! (Github upgraded)

thanks you very much, better than Dr. House
 

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