EPrints Technical Mailing List Archive

Message: #09470


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

RE: [EP-tech] ORCID Plugin Subroutine run_people_with_orcids redefined


CAUTION: This e-mail originated outside the University of Southampton.

Hi Mario,

Ah, yes – apologies for that oversight.
I’ve just updated the branch – and normalised it to ‘person’ and ‘people’ – which is more accurate for the method.

 

At some point this should be merged into the next release of the plugin.

 

Cheers,

John

 

From: eprints-tech-request@ecs.soton.ac.uk <eprints-tech-request@ecs.soton.ac.uk> On Behalf Of Beaudoin, Mario
Sent: Thursday, November 2, 2023 4:01 PM
To: eprints-tech@ecs.soton.ac.uk
Subject: RE: [EP-tech] ORCID Plugin Subroutine run_people_with_orcids redefined

 

CAUTION: This e-mail originated outside the University of Southampton.

CAUTION: This e-mail originated outside the University of Southampton.

Hello,

The solution works fine

Except we have to replace creators line 169 by contributors in your code.

 

https://github.com/eprints/orcid_support/commit/5bd00ef5d447144c98e2e762209e0ad5b37d7f1a

 

thank a lot

 

Mario

De : eprints-tech-request@ecs.soton.ac.uk <eprints-tech-request@ecs.soton.ac.uk> De la part de John Salter
Envoyé : 1 novembre 2023 09:19
À : eprints-tech@ecs.soton.ac.uk
Objet : RE: [EP-tech] ORCID Plugin Subroutine run_people_with_orcids redefined

 

CAUTION: This e-mail originated outside the University of Southampton.

CAUTION: This e-mail originated outside the University of Southampton.

Hi Mario,

What’s happening here is (simplified version)

  • When Apache starts, it loads the perl modules from perl_lib, lib, site_lib.
  • It then loads the individual archive configuration in alphabetical order:
    • archives/aaa/cfg/…
    • archives/bbb/cfg/…
  • the config in z_orcid_support.pl (https://github.com/eprints/orcid_support/blob/master/cfg/cfg.d/z_orcid_support.pl#L124-L130 ) is adding a new method to the EPrints::Script::Compiled package. For archive ‘aaa’, this is OK. For archive ‘bbb’ (and each one alphabetically after it), it will be redefining the method – and the warning is produced.
  • The code defined in the alphabetically last archive will be the version that ‘wins’ – so if you wanted to change the ‘;’ only in ‘aaa’ archive, it won’t work. Also, if you change it in the last one ‘bbb’, it will also be changed in ‘aaa’!

 

I hope that makes sense as an explanation for ‘why’.

 

The ‘how to fix it’ part:

The inclusion of text in one language (the ‘and’ on line 170) in the run_people_with_orcids method is poor design (this may well have been my fault a few years ago – sorry!).

This should be a phrase to allow each archive, and each language in each archive to use a relavent term. The ‘,’ joiner should also be a phrase. I’ve added this as an Issue: https://github.com/eprints/orcid_support/issues/30

There is a proposed fix in that issue too.

 

To add the proposed fix, you would need to replace the z_orcid_support.pl file in all archives.

For the archive that you want different ‘joiners’ (the ‘;’ or ‘,’) you will also need to add the new phrases to a file in ~/archives/[ARCHIVEID]/cfg/lang/[LANG]/phrases/

 

Let me know if that works for you – feel free to comment on the issue and/or here.

 

I have also submitted an issue for the ‘redefined’ aspect here: https://github.com/eprints/orcid_support/issues/31, but not made a suggested fix for that yet.

Cheers,

John

 

John Salter

https://orcid.org/0000-0002-8611-8266

 

White Rose Libraries Technical Officer
IT - Application Support (Research)
University of Leeds

From: eprints-tech-request@ecs.soton.ac.uk <eprints-tech-request@ecs.soton.ac.uk> On Behalf Of Beaudoin, Mario
Sent: Tuesday, October 31, 2023 6:38 PM
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] ORCID Plugin Subroutine run_people_with_orcids redefined

 

CAUTION: This e-mail originated outside the University of Southampton.

CAUTION: This e-mail originated outside the University of Southampton.

Hello,

 

When the ORCID plugin is installed on repository eprints the file “z_orcid_support.pl”  is copied inside archiveID/cfg/cfg.d.

if we have more than one archive we have more than one file z_orcid_support.pl.

In this case the subroutine run_people_with_orcids  appear a lot of  time.

When I restart Apache server, I got the error

Subroutine run_people_with_orcids redefined at (eval 2408) line 171.

 

I don’t care of this error soon as I want to modify the subroutine in one specific archive. They want ; until , between creator.

Easy to find the line 174 change , to ;  reload configuration work finds.

 

But if I restart Apache servers, the modification disappears. 

the first  Subroutine run_people_with_orcids find by the server is used for all archives

 

Do you have any suggestion for this

 

Thank you,

 

Mario Beaudoin