EPrints Technical Mailing List Archive
See the EPrints wiki for instructions on how to join this mailing list and related information.
Message: #09804
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] File Missing from Eprints Archive
- To: <eprints-tech@ecs.soton.ac.uk>
- Subject: Re: [EP-tech] File Missing from Eprints Archive
- From: David R Newman <drn@ecs.soton.ac.uk>
- Date: Sun, 4 Aug 2024 10:18:03 +0100
Hi Hirak Jyoti Hazarika,
There is no such file called eprint_fields.xml by default. If you want to add extra phrases (aka tags or labels) for eprint fields, then you can either add them to (substitute EPRINTS_PATH and ARCHIVE_ID as appropriate):
EPRINTS_PATH/archives/ARCHIVE_ID/cfg/lang/en/phrases/local.xml
Or use the Admin web interface to add phrases through the Phrase Editor under the Config. Tools tab. If you really want a eprints_fields.xml phrase file you can create one. My advice is to just copy local.xml to eprint_fields.xml in the same directory (as above) and then you can start editing that. If you edit phrase files from the command line, you will likely need to reload the web server (e.g. apache2ctl reload on Ubuntu).
eprints_fields.pl does not exist under the archive's configuration settings directory (i.e. EPRINTS_PATH/archives/ARCHIVE_ID/cfg/cfg.d/) when an new EPrints repository is created. If you only need to add new fields I would advise NOT copying it from EPRINTS_PATH/flavours/pub_lib/cfg.d/eprint_fields.pl) but creating a new file called EPRINTS_PATH/archives/ARCHIVE_ID/cfg/cfg.d/eprint_fields_local.pl. There are more detailed instructions on how to do this at https://wiki.eprints.org/w/Adding_a_Field_to_a_Live_Repository
If you add new fields you will also need to add these to the eprint workflow. This will not exists in the archive of a newly created EPrints repository archive but in this case you WILL need to first copy it across, as follows:
mkdir -p EPRINTS_PATH/archives/ARCHIVE_ID/cfg/workflows/eprint/
cp EPRINTS_PATH/flavours/pub_lib/workflows/eprint/default.xml EPRINTS_PATH/archives/ARCHIVE_ID/cfg/workflows/eprint/
This file is XML but uses an EPrints
namespace to allow the definition of stages of the workflows and
then components and finally fields under that workflow. If you
compare what you see in this workflow file with you experience
when you create a new item and click through the forms, hopefully
it becomes clearer how you can add new fields you new, possibly
remove those you don't want and otherwise rearrange where fields
appear. There is further guidance at
https://wiki.eprints.org/w/Workflow_Format with one important tip
to add: When making sure the workflow is valid after editing use
the xmllint command to test it:
xmllint EPRINTS_PATH/archives/ARCHIVE_ID/cfg/workflows/eprint/default.xml > /dev/null
This drops the standard output, so if you see any output this will be the errors.
Once you have added your new fields to the workflow you will need to add phrases for them. The easiest way to do this is probably to reload Apache to make sure you modified workflow is loaded. Then create an item through the web interface and click through the stages. If you see anything like "[eprint_fieldname_NEW_FIELD is not defined]". Then you will need to add it to the local.xml (or if you created it eprint_fields.xml) I described earlier. Like after modifying the workflow, if you have added any new phrases, you will likely need to reload Apache, so they appear in the web interface.
Hopefully that answers you question. It can take a little while to understand how to customise your EPrints repository but once you have done something like adding a field once or twice, it should become a fairly straightforward task.
Regards
David Newman
xmllint EPRINTS_PATH/archives/ARCHIVE_ID/cfg/workflows/eprint/default.xml > /dev/null
This drops the standard output, so if you see any output this will be the errors.
Once you have added your new fields to the workflow you will need to add phrases for them. The easiest way to do this is probably to reload Apache to make sure you modified workflow is loaded. Then create an item through the web interface and click through the stages. If you see anything like "[eprint_fieldname_NEW_FIELD is not defined]". Then you will need to add it to the local.xml (or if you created it eprint_fields.xml) I described earlier. Like after modifying the workflow, if you have added any new phrases, you will likely need to reload Apache, so they appear in the web interface.
Hopefully that answers you question. It can take a little while to understand how to customise your EPrints repository but once you have done something like adding a field once or twice, it should become a fairly straightforward task.
Regards
David Newman
On 03/08/2024 2:32 pm, Hirak Jyoti
Hazarika wrote:
CAUTION: This e-mail originated outside the University of Southampton.CAUTION: This e-mail originated outside the University of Southampton.Dear Sir/ Ma'am,
I have installed eprints software in ubuntu 22.04. After installation, I could not find eprint_fields.pl: and eprint_fields.xml. I want to add some metadata tags.But the software worked nicely. Link: http://pure.koha.co.in/
How to solve this problem, Kindly help me please.
Thank you.
RegardsDr Hirak Jyoti Hazarika
*** Options: https://wiki.eprints.org/w/Eprints-tech_Mailing_List *** Archive: https://www.eprints.org/tech.php/ *** EPrints community wiki: https://wiki.eprints.org/
- References:
- [EP-tech] File Missing from Eprints Archive
- From: Hirak Jyoti Hazarika <hirakhazarika2014@gmail.com>
- [EP-tech] File Missing from Eprints Archive
- Prev by Date: [EP-tech] File Missing from Eprints Archive
- Next by Date: Re: [EP-tech] MyISAM to InnoDB
- Previous by thread: [EP-tech] File Missing from Eprints Archive
- Index(es):