[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[EP-tech] Display box view like Divivions
Hi,
It looks like you already have a field with this name in your EPrints
configuration.? I would check across all of your cfg/cfg.d/ directory to
see if you can find field configuration for this other 'course' field in
another file or maybe earlier in eprint_fields.pl.
If this already exists and has values you would either need to add a new
field with a different name or convert the existing field to a subject
field.? A subject field has the same type of database field so the
latter is possible.? However, it is likely that the values stored in
this field will not be compatible with being a subject field.? So unless
there are no values currently set for the existing course field, then I
would not advise changing that field's config.
This has really gone beyond the point where it is easy to advise what to
do, as there is a risk that I could give you the wrong advice because I
don't know the exactly what fields you have and how they are being
used.? I think the safest thing to do is to call the new subject field
for course, course_id rather than just course, this should avoid the
duplicate column issue.? This would change the IDs for the phrases you
need to add and the config you need to add to your workflow.
Once you have added this field and the subject tree it uses, you may
want to map the values across for the original course field across to
this new course_id.? If there are not many values, then it is easiest to
do this manually.? If there is a lot of values you may want to write a
script that can do the mapping.
Regards
David Newman
On 21/03/2023 9:21 am, Agung Prasetyo W. wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
> Hi David,
>
> There is an error like below :
>
> Possible attempt to put comments in qw() list at (eval 162) line 36.
>
> Starting EPrints Repository.
> Connecting to DB ... done.
> DBD::mysql::db do failed: Duplicate column name 'course' at
> /usr/share/eprints3/bin/../perl_lib/EPrints/Database.pm line 3052.
> SQL ERROR (do): ALTER TABLE `eprint` ADD `course` varchar(255)
> CHARACTER SET utf8 COLLATE utf8_bin
> SQL ERROR (do): Duplicate column name 'course' (#1060)
> Failed adding course to dataset eprint
>
> if an error like that appears, do I have to create a new field? if for
> example I want to create a new field and the 'course' field is
> deleted, what should I do?
>
> On Tue, Mar 21, 2023 at 4:03?PM David R Newman <drn at ecs.soton.ac.uk>
> wrote:
>
> Hi Agung PW,
>
> You need to make sure you add this configuration before the end of
> the eprint_fields.pl
> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Feprint_fields.pl%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846566093%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=acRBOKzB7PgaVUMYaR3G19xZoxotWoCX0FJ04VvuzSw%3D&reserved=0>
> file.? In particular before the last line which should just be:
>
> ];
>
> If not it will not pick this up as a new field.? Also, I would
> expect there to be a syntax error, if you put this right at the
> end of the file.? If you have a lot of eprint records, this will
> take a long time to run.? However, I would expect some output at
> the end even if no fields are added.? This is what I saw when I
> ran epadmin of a test repository I knew needed no new fields
> needed adding:
>
> 0 datasets added
> 0 fields added
> 0 counters were added
>
> If it had added a new field (assuming it is called 'course') I
> would have expected to see something like:
>
> Added course to dataset eprint
> 0 datasets added
> 1 fields added
> 0 counters were added
>
> Regards
>
> David Newman
>
> On 21/03/2023 8:55 am, Agung Prasetyo W. wrote:
>> *CAUTION:* This e-mail originated outside the University of
>> Southampton.
>> Hi David,
>>
>> I have tried to enter the field into eprints_field.pl
>> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Feprints_field.pl%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846566093%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=hWuEjuozyqpKnNAWQNpUPlPrtF%2F45ZHK5IA01FR82Ds%3D&reserved=0>,
>> but when I run the epadmin update ArchiveID command, the process
>> takes a very long time and no notification has appeared.
>>
>> Regards,
>> Agung PW
>>
>> On Tue, Mar 21, 2023 at 3:14?PM David R Newman via Eprints-tech
>> <eprints-tech at ecs.soton.ac.uk> wrote:
>>
>> Hi,
>>
>> Subjects and Divisions boxes are subject type fields that
>> include a part of the subject tree. Therefore you would need
>> to add a new sub-tree to your subject tree to include all
>> your course options.? (You can use the Edit Subject page [1]
>> linked from the Admin page to do this). Then you would need
>> to add some configuration like the following to your
>> archive's cfg/cfg.d/eprint_fields.pl
>> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Feprint_fields.pl%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=P1P5rPNpP37z0yWil8dgg3XXjdlmrvujs9tcEwEexWA%3D&reserved=0>
>> file:
>>
>> {
>> ??? name => 'course',
>> ??? type => 'subject',
>> ??? top => 'courses',
>> ??? browse_link => 'courses',
>> },
>>
>> I have made some assumptions here:
>>
>> 1. That your would only ever need to store one course value
>> against and eprint record.? If you need more you may need to
>> add the line:
>>
>> multiple => 1,
>>
>> to the above configuration.
>>
>> 2. That the subject ID for the top of your courses sub-tree
>> is 'courses'.
>>
>> 3. That you intend to create a browse view for courses like
>> by default you will have for subjects and divisions.
>>
>> Once you have added this configuration you will need to run
>> the following command (substituting EPRINTS_PATH and
>> ARCHIVE_ID) as appropriate:
>>
>> EPRINTS_PATH/bin/epadmin update ARCHIVE_ID
>>
>> Next you will need to add this field to your workflow. This
>> will need a line like the following at the point you want
>> this to appear in your workflow:
>>
>> <component><field ref="course" /></component>
>>
>> You may at this point also want to add some phrases.? You can
>> does this via the Phrase Editor page link from the Admin page
>> or edit a phrases file from the command line.? The minimum
>> phrases you will need are eprint_fieldname_course and
>> eprint_fieldhelp_course.
>>
>> Once you have done all the is you will need to test the
>> configuration is valid an reload the web server:
>>
>> EPRINTS_PATH/bin/epadmin test
>> apachectl graceful
>>
>> I have been working on improving the documentation pages
>> about different types of metadata field as listed at
>> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FCategory%3AEPrints_Metadata_Fields&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5P7E%2Ff1PE2VHvm3lBk5M9fJr2Of4mzHCxQHR%2FOmPKY8%3D&reserved=0
>> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FCategory%3AEPrints_Metadata_Fields&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=5P7E%2Ff1PE2VHvm3lBk5M9fJr2Of4mzHCxQHR%2FOmPKY8%3D&reserved=0>.?
>> I have not got to updating the subject field [2] yet but hope
>> to do so today or later this week. However, I hope to add
>> some useful configuration examples to help when it comes to
>> questions like yours here.
>>
>> Regards
>>
>> David Newman
>>
>> [1]
>> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FAdmin%2FConfig._Tools%2FEdit_subject&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vX%2B8LnSG4GW6lejLM3x0CkSxxo3G47U0ujQue0ur0v0%3D&reserved=0
>> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FAdmin%2FConfig._Tools%2FEdit_subject&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=vX%2B8LnSG4GW6lejLM3x0CkSxxo3G47U0ujQue0ur0v0%3D&reserved=0>
>> [2] https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FSubject_field&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=fpSzugnx74c%2FiU2j14QhzJVqMBBj4HxASGgs86B1X8Q%3D&reserved=0
>> <https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FSubject_field&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=fpSzugnx74c%2FiU2j14QhzJVqMBBj4HxASGgs86B1X8Q%3D&reserved=0>
>>
>>
>> On 20/03/2023 7:17 am, Agung Prasetyo W. via Eprints-tech wrote:
>>> *CAUTION:* This e-mail originated outside the University of
>>> Southampton.
>>> Hi,
>>>
>>> I just added a field for a course with a lot of data. How
>>> can I make the view in the Details section so that it
>>> displays the course data like the divisions view or like
>>> Subject ?
>>>
>>> image.png
>>>
>>> Thank you.
>>>
>>> Regards,
>>> Agung Prasetyo WIbowo
>>>
>>> *** 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=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2Bx9nzIVoB3PIFIswiDQTrYUs8dxp6T7hTuvZeNeEHE0%3D&reserved=0 <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2Bx9nzIVoB3PIFIswiDQTrYUs8dxp6T7hTuvZeNeEHE0%3D&reserved=0>
>>> *** EPrints community wiki:https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=BESoxMUJhfN%2FZRkJkA4E0B3BgRqf%2BIw7Eedfw2EKDzY%3D&reserved=0 <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=BESoxMUJhfN%2FZRkJkA4E0B3BgRqf%2BIw7Eedfw2EKDzY%3D&reserved=0>
>>
>> *** 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=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2Bx9nzIVoB3PIFIswiDQTrYUs8dxp6T7hTuvZeNeEHE0%3D&reserved=0
>> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=%2Bx9nzIVoB3PIFIswiDQTrYUs8dxp6T7hTuvZeNeEHE0%3D&reserved=0>
>> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=BESoxMUJhfN%2FZRkJkA4E0B3BgRqf%2BIw7Eedfw2EKDzY%3D&reserved=0
>> <https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C29ff73122aed4a5cada608db29efbc45%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C638149881846722326%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=BESoxMUJhfN%2FZRkJkA4E0B3BgRqf%2BIw7Eedfw2EKDzY%3D&reserved=0>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20230321/c589f2e8/attachment-0001.html
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 40191 bytes
Desc: not available
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20230321/c589f2e8/attachment-0001.png