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

[EP-tech] How to remove a sub field from a compound field?

Hi Dennis,

Assuming you want to remove a sub-field from the eprint data object 
(dataobj) and you are running at least EPrints 3.3.x then you would need 
to edit the field in eprint_fields.pl under 
archives/ARCHIVE_NAME/cfg/cfg.d/ to remove the sub-field from the 
compound field*.? If you cannot find the field in here see if you can 
find the field somewhere else in the cfg.d/ directory.? If it is a 
compound field you will probably not need to remove this sub-field from 
cfg/workflows/eprint/default.xml but you may need to remove it from 
citations in cfg/citations/eprint/.

Generally, I advise against removing fields using epadmin remove_field, 
just in case you decide you want to reinstate it later, if you have 
remove it from all the places it is included (eprint_fields.pl, 
workflows and possibly citations and eprints_render.pl and other cfg.d 
files).? This should mean that EPrints forgets about the field and you 
shouldn't get any errors from EPrints trying to find a field that is no 
longer defined.


David Newman

*If you are trying to remove a sub-field for a core field on the data 
object you may not be able to do this by editing one of the config 
files.? Instead you will need to edit perl_lib/EPrints/DataObj/Eprint.pm 
or whatever data objects you are dealing with.

On 04/08/2020 15:45, Dennis - UT via Eprints-tech wrote:
> Hi,
> Does anyone know how to remove a sub field from a compound field? I
> removed the field from metafields.xml and metafields.pl. I also
> removed any reference to it from other files in the archive cfg
> folder, followed by a restart. This doesn't make the field disappear
> however.
> I tried epadmin remove_field on the subfield. This does delete the DB
> table, but the sub field is still in the UI. If I run epadmin update
> afterward, it just adds the table back.
> Somehow somewhere it still remembers the sub field.
> How can I completely remove the sub field?
> Thanks!
> Dennis
> University of Twente - NL
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=01%7C01%7C%7Cee7819fc09fe4300981208d8388ee552%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=eeKnLwalFvn3gdppsZIakcqIO%2FUzhCob8ChDicXUFQU%3D&reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=01%7C01%7C%7Cee7819fc09fe4300981208d8388ee552%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=Ozq0QJcKqAruMVhiG1k5sBIUvMBmKPu4Ff9gNtqu5Vo%3D&reserved=0

This email has been checked for viruses by AVG.