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

[EP-tech] Error on New Metadata Field



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

This resolves the problem.

Thank you so much..

Izwan
UiTM Digital Library

On Fri, Sep 10, 2021 at 7:18 PM David R Newman <drn at ecs.soton.ac.uk<mailto:drn at ecs.soton.ac.uk>> wrote:

Hi Izwan,

I was wrong.  It was actually some code I added fairly recently to solve a long standing problem with subject fields.  This problem being that you want to stop people using a particular subject option for future records but you want existing records to still be able to use this option.  Technically, all you should just need to set the subject as undepositable and when the subject field is displayed with the special rendered input, like the Subjects stage of the workflow, this does the job.  (It won't allow you to select it if it is not already selected but it won't unselect it when you save the record).  However, when you have a subject field with the standard select input box, you could deselect these no longer depositable options without realising.  If you are to unset these, you want the user to have deliberately deselected them.

The following GitHub issue deals with this problem:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fissues%2F144&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943049089%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=X8CGThBatQ6i3LnPx%2BJ08lRSbt1RDFuyEQlYQgR7fVY%3D&amp;reserved=0

I have just pushed the following patch to fix the problem you reported and another I noticed whilst trying to fix this:

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4%2Fcommit%2F41f6f199d7abb753a3d180aabde6a0c482825ff8&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943049089%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=swxHu5CFUnQe4bdlUG8pLjKj0SjiXn5UOQcu2CjG%2Fc8%3D&amp;reserved=0

I will update the EPrints 3.4.3 wiki page [1] to add this patch.

Regards

David Newman

[1] https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwiki.eprints.org%2Fw%2FEPrints_3.4.3&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943049089%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=w%2Btj2ggotCxbGhIhOVMQjmq35auNvJAv%2BwP6F2uyQVY%3D&amp;reserved=0


On 10/09/2021 11:08, David R Newman via Eprints-tech wrote:

Hi Izwan,

I have been able to reproduce this bug but I cannot quite understand why this would lead to an error as it calls a function that is not called by other subject fields.  I will need to dig a little deeper to get to the bottom of this. I would not be surprised if this is a rather long standing bug as usually MetaFields are added from the command line and the occasional times MetaFields are added via the web interface, Subject MetaFields are an unusual type to add.

Regards

David Newman

On 10/09/2021 00:32, MOHD.IZWAN SALIM wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Dear David and EP Team

I have the journal list in Subject :

[image.png]
Regards

Izwan
UiTM Digital Library


On Thu, Sep 9, 2021 at 11:49 PM David R Newman <drn at ecs.soton.ac.uk<mailto:drn at ecs.soton.ac.uk>> wrote:

Hi Izwan,

I suspect the issue is that the parent subject with the ID 'journal' does not exist.  Click on the Admin link in your menu and in then "Config. Tools" tab on the Admin page click on the "Edit subject" button.  You will need to create a 'journal' subject.  You can do this by adding the word 'journal' in the input box next to "Subject ID String" and then clicking on the "Create" button.  You will then need assign a label for this subject (e.g. Journals) and set whether it should be depositable (probably not, as this is a parent subject).  You will then need to add subjects under this parent 'journal' subject for all the journals you want a user to be able to choose from for this 'journal_in_university' field.  I would try to use a consistent format for these journal subject IDs like jrnl_nature for the Nature journal.

Regards

David Newman

On 09/09/2021 16:30, MOHD.IZWAN SALIM via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Dear all, I added a new field from Manage Metadata Fields - Eprints page. with type subjects. After i added the field in workflow, the system show Internal Server Error with error log

[Thu Sep 09 15:22:46.543546 2021] [:error] [pid 109882:tid 139759477307136] Can't use an undefined value as an ARRAY reference at /usr/share/eprints/perl_lib/EPrints/MetaField/Subject.pm line 128.\n

The zz_webcfg_eprint_fields.pl<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fzz_webcfg_eprint_fields.pl%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943049089%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=R7VoPRxjZCjRk38gAC7dYwZaPCdf13CnXSrWIIlcP9w%3D&amp;reserved=0> setting is
  'allow_null' => '1',
  'export_as_xml' => '0',
  'input_boxes' => 3,
  'input_cols' => 60,
  'input_ordered' => 0,
  'input_rows' => 10,
  'input_style' => 0,
  'maxlength' => 255,
  'multiple' => '0',
  'name' => 'journal_in_university',
  'provenance' => 'user',
  'required' => '1',
  'sql_index' => '1',
  'top' => 'journal',
  'type' => 'subject',
  'volatile' => '0'

The new field existed in the database. Did i miss to run something here?

Regards

Izwan
UiTM Digital Library


PENAFIAN: E-mel ini dan apa-apa fail yang dihantar bersama-samanya ("Mesej") adalah dihasratkan hanya untuk kegunaan penerima yang dinyatakan di atas dan mungkin mengandungi maklumat yang tidak umum, bermilik, istimewa, sulit dan dikecualikan dari penzahiran di bawah undang-undang yang terpakai termasuklah Akta Rahsia Rasmi 1972. BACA SELANJUTNYA...<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.uitm.edu.my%2Findex.php%2Fcomponent%2Fcontent%2Farticle%3Fid%3D2%26Itemid%3D103&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943049089%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=wTFghg0%2F13GZtRu60Olh4qfJvzsmr0xOzDjvXPXcbdY%3D&amp;reserved=0>

________________________________
DISCLAIMER : This e-mail and any files transmitted with it ("Message") is intended only for the use of the recipient(s) named above and may contain information that is non-public,  proprietary,  privileged,  confidential  and  exempt  from  disclosure under applicable law including the Official Secrets Act 1972. READ MORE...<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.uitm.edu.my%2Findex.php%2Fcomponent%2Fcontent%2Farticle%3Fid%3D2%26Itemid%3D103&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=yC7SOJCffoq3rYgz853kargudfPXBJxXn%2B28N19FO9E%3D&amp;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&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=01UnPTzfYiPpa%2FrY7y5D9shBrTWNErYkfHJBU2eFsAw%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=01UnPTzfYiPpa%2FrY7y5D9shBrTWNErYkfHJBU2eFsAw%3D&amp;reserved=0>
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Rkcw0ksySEDhSAR0e6YYRELWEUKuJFDCvYE5zLPk51s%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Rkcw0ksySEDhSAR0e6YYRELWEUKuJFDCvYE5zLPk51s%3D&amp;reserved=0>

[https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fipmcdn.avast.com%2Fimages%2Ficons%2Ficon-envelope-tick-green-avg-v1.png&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=moo2jLslJO6yQ2ZBbsKirIJ%2FZXaVPyvicqkVOSxqhC4%3D&amp;reserved=0]<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3VZgFZYarNkpNLSMMszuEdXudueXDzNf7%2FqZytMbAQw%3D&amp;reserved=0>       Virus-free. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=VMTLEB9VMUy%2BLGPcyTEslnvLuxhIk4TYBQgO7lL4F8U%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3VZgFZYarNkpNLSMMszuEdXudueXDzNf7%2FqZytMbAQw%3D&amp;reserved=0>


PENAFIAN: E-mel ini dan apa-apa fail yang dihantar bersama-samanya ("Mesej") adalah dihasratkan hanya untuk kegunaan penerima yang dinyatakan di atas dan mungkin mengandungi maklumat yang tidak umum, bermilik, istimewa, sulit dan dikecualikan dari penzahiran di bawah undang-undang yang terpakai termasuklah Akta Rahsia Rasmi 1972. BACA SELANJUTNYA...<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.uitm.edu.my%2Findex.php%2Fcomponent%2Fcontent%2Farticle%3Fid%3D2%26Itemid%3D103&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=yC7SOJCffoq3rYgz853kargudfPXBJxXn%2B28N19FO9E%3D&amp;reserved=0>

________________________________
DISCLAIMER : This e-mail and any files transmitted with it ("Message") is intended only for the use of the recipient(s) named above and may contain information that is non-public,  proprietary,  privileged,  confidential  and  exempt  from  disclosure under applicable law including the Official Secrets Act 1972. READ MORE...<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.uitm.edu.my%2Findex.php%2Fcomponent%2Fcontent%2Farticle%3Fid%3D2%26Itemid%3D103&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=yC7SOJCffoq3rYgz853kargudfPXBJxXn%2B28N19FO9E%3D&amp;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&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=01UnPTzfYiPpa%2FrY7y5D9shBrTWNErYkfHJBU2eFsAw%3D&amp;reserved=0
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=Rkcw0ksySEDhSAR0e6YYRELWEUKuJFDCvYE5zLPk51s%3D&amp;reserved=0


PENAFIAN: E-mel ini dan apa-apa fail yang dihantar bersama-samanya ("Mesej") adalah dihasratkan hanya untuk kegunaan penerima yang dinyatakan di atas dan mungkin mengandungi maklumat yang tidak umum, bermilik, istimewa, sulit dan dikecualikan dari penzahiran di bawah undang-undang yang terpakai termasuklah Akta Rahsia Rasmi 1972. BACA SELANJUTNYA...<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.uitm.edu.my%2Findex.php%2Fcomponent%2Fcontent%2Farticle%3Fid%3D2%26Itemid%3D103&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=yC7SOJCffoq3rYgz853kargudfPXBJxXn%2B28N19FO9E%3D&amp;reserved=0>

________________________________
DISCLAIMER : This e-mail and any files transmitted with it ("Message") is intended only for the use of the recipient(s) named above and may contain information that is non-public,  proprietary,  privileged,  confidential  and  exempt  from  disclosure under applicable law including the Official Secrets Act 1972. READ MORE...<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmail.uitm.edu.my%2Findex.php%2Fcomponent%2Fcontent%2Farticle%3Fid%3D2%26Itemid%3D103&amp;data=04%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C5ffcb62d895e49f478d308d974b2847e%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637669132943059040%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=yC7SOJCffoq3rYgz853kargudfPXBJxXn%2B28N19FO9E%3D&amp;reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20210911/2bca7316/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 2065 bytes
Desc: not available
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20210911/2bca7316/attachment-0001.png