EPrints Technical Mailing List Archive

Message: #09223


< 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.4.3: adding new options for editing items


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

Hi Chris, David,
I thing you need to update the repository config to add a new option to the field - which is then displayed in the editing workflow itself.

You need to add an option to the file:

[EPRINTS_ROOT]/archives/[ARCHIVE_ID]/cfg/cfg.d/eprint_fields_pub.pl (see details here: https://wiki.eprints.org/w/Eprint_fields_pub.pl)

 

There is a definition for 'thesis_type' and 'thesis_name' - should be something like this: https://github.com/eprints/eprints3.4/blob/master/flavours/pub_lib/cfg.d/eprint_fields_pub.pl#L130-L153

 

Add a new option, and also a phrase. If your new option was 'my_thesis_type', the phrase would be:
<epp:phrase id="eprint_fieldopt_thesis_type_new_thesis_type">New thesis type</epp:phrase>
This can be added to the phrase file you identified.

 

You then need to restart the webserver (apache) for the new value to be visible.

 

Cheers,

John

 

From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of David R Newman via Eprints-tech
Sent: 07 March 2023 10:21
To: eprints-tech@ecs.soton.ac.uk; Chris Halliwell <c.halliwell@cityandguildsartschool.ac.uk>
Subject: Re: [EP-tech] Eprints 3.4.3: adding new options for editing items

 

Hi Chris,

I think you are referring to the abstract pages not updating with your changes to thesis_name and thesis_type phrases.  These are cached server side the first time they are requested after a change to their underlying metadata.  As changing a phrase does not change the underlying metadata, then these pages will not be re-cached.  It does not sound like you have run "Regenerate Abstracts", which has a button you can click in the "System Tools" tab of the Admin page (although this may be what your mean by "rebuilding static pages").

The other issue could be that the phrases for thesis_name and thesis_type are already set in a phrase file that loads after zz_webcfg.xml.  I would check your archive's cfg/lang/en/phrases/ directory for a file that starts zzz_ or similar, (i.e. anything alphabetically later).  One further possible issue is that zz_webcfg.xml has become corrupted and no longer applies any of its phrases.  If you have command line access, you could try running:

xmllint zz_webcfg.xml > /dev/null

And see if you see any errors are output.  You may need to install install xmllint which comes in the libxml2-utils APT package.

Regards

David Newman

On 07/03/2023 10:04 am, Chris Halliwell via Eprints-tech wrote:

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

Hello,

 

I have recently built an eprints repository, running eprints 3.4.3 on an Ubuntu 20.04.5 LTS server with Maria DB 10.3.37. The repository is live.

 

Both the Librarian and myself are currently stumped by how to add options to a field such as Thesis Type or Thesis Name when editing an item.

 

If an option is added using "edit page phrases", then that change is reflected in archives/ARCHIVE_NAME/cfg/lang/en/phrases/zz_webcfg.xml, but no amount of reloading the configuration, rebuilding static pages, or restarting Apache, will cause that addition to be reflected in the webpage. By contrast, modifying an existing option works as expected.

 

My guess is that what is needed is a direct update to the database. I don't see an option for this through the eprints front end, but that's not a problem.

 

What I'd really like to know is what is best practice here? Is it a matter of updating the database along with editing the page phrase, or are there additional steps to take? Should such edits be made on a live repo at all, and if not, how do we toggle its live state?

 

Thanks and best regards,

 

Chris

 

Chris Halliwell  I  IT Manager

City & Guilds of London Art School, 124 Kennington Park Road, London SE11 4DJ

Charity Registration no. 1144708  I  Company no. 7817519

www.cityandguildsartschool.ac.uk



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