EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #08291


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

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


Hi David,

Thanks for the reply!

It's a custom field on the eprint data object. I already removed the
subfield from all of the mentioned files. Is field information also
stored or cached elsewhere? I saw some references in mf* tables, but
removing those also didn't work.

Dennis
University of Twente - NL

On Tue, Aug 4, 2020 at 5:56 PM David R Newman <drn@ecs.soton.ac.uk> wrote:
>
> 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.
>
> Regards
>
> 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&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C7784d9b651fb43a65bd108d8396479cf%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=zaLzpYTm27UgOCpoEADRH2cH2b6l3B6ll5pnFEVDSGQ%3D&amp;reserved=0
> > *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C7784d9b651fb43a65bd108d8396479cf%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=4aqGXuuTkAC0onKb6MoKLlk%2FGDihueYcbBAPj4pbuMU%3D&amp;reserved=0
>
> --
> This email has been checked for viruses by AVG.
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avg.com%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C7784d9b651fb43a65bd108d8396479cf%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=O%2FFrluBsglDa4P%2BZPW6i8uws9jRRTu0sgeGXX9gb0RQ%3D&amp;reserved=0
>