[EP-tech] Ask about result of command generate_abstract in eprints 3.4.3

Ajunk Pracetio prazetyo at gmail.com
Tue May 24 04:49:50 BST 2022


CAUTION: This e-mail originated outside the University of Southampton.
So the problem seems to be that the Time::Local::timegm function has been called without any parameters.  As $sec (i.e. seconds past the minute) is the first parameter.  In theory, you should never call Time::Local::timegm itself as should only be called through an EPrints::Time function or some other core codebase file, which should not call this function without parameters.

Looking through the codebase to see where timegm or functions that call timegm are called, the one that is most likely to affect generating abstracts is the use in perl_lib/EPrints/Script/Compiled.pm.  To help debug this is would be useful to see the following files if you have modified them for your archive configuration, i.e. under archives/ARCHIVEID/cfg/:

cfg.d/eprint_render.pl<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Feprint_render.pl%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6e8fa03e0a7640fa63e508da3d387b35%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637889610614602990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=fyH4RWtQLdvOipp7tWNm2qoJLZ5hFim0%2Bbg70ssOBIA%3D&amp;reserved=0>

citations/eprint/default.xml

citations/eprint/summary_page.xml

citations/document/default.xml

Whilst I was checking through this, I noted that I recently (post 3.4.3 release) made a change to lib/citations/eprint/document/default.xml so it uses the comparison of the embargo date with today to determine what to display.  Just to confirm you are not trying to install EPrints from the latest revision of EPrints 3.4 on GitHub (i.e. Git HEAD), which you would get if you run the following without a further git checkout to get a specific version:

git clone https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4.git&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6e8fa03e0a7640fa63e508da3d387b35%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637889610614602990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=haW8mM6G65x9lJoFlTxtDt08Z3Y3hMGQxs8gKcPENYE%3D&amp;reserved=0

If so are any restricted documents for the abstracts pages generated by you running generate_abstracts?

No, I don't have any restricted documents. My trial has only 2 new items.

Based on the two sets of error messages, it looks like both abstract pages are affected, so this is a general rather than specific  issue.  So I need to checks some details about you install:

1. Is this upgrade installed on a new server or are you upgrading your live repository?
This is new installation on new server

2. If this is a new server, what version of Ubuntu or other type of Linux are you currently running for your live repository on?
Ubuntu Server 20.04 LTS

3. What version of EPrints are you upgrading from?
I'm running new installation..not upgrading

4. What process of upgrading EPrints are you using?  Are you installing the new version of EPrints from source?  If so please give some details are where you are getting the source for EPrints 3.4.3 and the process you are using to deploy it.

I'm installing this eprints from eprints deb from /etc/apt/sources.list

On Sun, May 22, 2022 at 5:19 PM David R Newman <drn at ecs.soton.ac.uk<mailto:drn at ecs.soton.ac.uk>> wrote:

Hi Agung,

So the problem seems to be that the Time::Local::timegm function has been called without any parameters.  As $sec (i.e. seconds past the minute) is the first parameter.  In theory, you should never call Time::Local::timegm itself as should only be called through an EPrints::Time function or some other core codebase file, which should not call this function without parameters.

Looking through the codebase to see where timegm or functions that call timegm are called, the one that is most likely to affect generating abstracts is the use in perl_lib/EPrints/Script/Compiled.pm.  To help debug this is would be useful to see the following files if you have modified them for your archive configuration, i.e. under archives/ARCHIVEID/cfg/:

cfg.d/eprint_render.pl<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Feprint_render.pl%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6e8fa03e0a7640fa63e508da3d387b35%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637889610614602990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=fyH4RWtQLdvOipp7tWNm2qoJLZ5hFim0%2Bbg70ssOBIA%3D&amp;reserved=0>

citations/eprint/default.xml

citations/eprint/summary_page.xml

citations/document/default.xml

Whilst I was checking through this, I noted that I recently (post 3.4.3 release) made a change to lib/citations/eprint/document/default.xml so it uses the comparison of the embargo date with today to determine what to display.  Just to confirm you are not trying to install EPrints from the latest revision of EPrints 3.4 on GitHub (i.e. Git HEAD), which you would get if you run the following without a further git checkout to get a specific version:

git clone https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Feprints3.4.git&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6e8fa03e0a7640fa63e508da3d387b35%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637889610614602990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=haW8mM6G65x9lJoFlTxtDt08Z3Y3hMGQxs8gKcPENYE%3D&amp;reserved=0

If so are any restricted documents for the abstracts pages generated by you running generate_abstracts?

Based on the two sets of error messages, it looks like both abstract pages are affected, so this is a general rather than specific  issue.  So I need to checks some details about you install:

1. Is this upgrade installed on a new server or are you upgrading your live repository?

2. If this is a new server, what version of Ubuntu or other type of Linux are you currently running for your live repository on?

3. What version of EPrints are you upgrading from?

4. What process of upgrading EPrints are you using?  Are you installing the new version of EPrints from source?  If so please give some details are where you are getting the source for EPrints 3.4.3 and the process you are using to deploy it.

Regards

David Newman

On 22/05/2022 3:32 am, Ajunk Pracetio via Eprints-tech wrote:
CAUTION: This e-mail originated outside the University of Southampton.
Hi,

I just installed eprints 3.4.3 on Ubuntu 20.04 LTS. When I running generate_abstract command, the result like this :
----------------------------------------------
eprints at repository:~$ ./bin/generate_abstracts ARCHIVEID --verbose
Possible attempt to put comments in qw() list at (eval 167) line 29.

Starting EPrints Repository.
Connecting to DB ... done.
Writing abstracts
Use of uninitialized value $sec in numeric ge (>=) at /usr/share/perl/5.30/Time/Local.pm line 136.
Use of uninitialized value $sec in numeric lt (<) at /usr/share/perl/5.30/Time/Local.pm line 136.
Use of uninitialized value $sec in addition (+) at /usr/share/perl/5.30/Time/Local.pm line 154.
Use of uninitialized value $sec in numeric ge (>=) at /usr/share/perl/5.30/Time/Local.pm line 136.
Use of uninitialized value $sec in numeric lt (<) at /usr/share/perl/5.30/Time/Local.pm line 136.
Use of uninitialized value $sec in addition (+) at /usr/share/perl/5.30/Time/Local.pm line 154.
Writing: /usr/share/eprints/archives/ARCHIVEID/html/en/archive/00/00/00/01/index
Generated 1
Generated 2
Done writing 2 abstracts
Ending EPrints Repository.
eprints at repository:~$
----------------------------------------------

Does the error message affect eprints or not? Is there a way to get rid of the message, because in previous versions of eprints, the error message did not appear.

Thank you.

Best regards,
Agung Prasetyo Wibowo
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fagungprasetyo.net%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6e8fa03e0a7640fa63e508da3d387b35%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637889610614602990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=FgnhIOg2rSZ9kdMAAp7Cu6MlVhKE6zYl8HMakH3RrX0%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fagungprasetyo.net%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6e8fa03e0a7640fa63e508da3d387b35%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637889610614602990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=FgnhIOg2rSZ9kdMAAp7Cu6MlVhKE6zYl8HMakH3RrX0%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=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6e8fa03e0a7640fa63e508da3d387b35%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637889610614602990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=TnnSq3xGAqWip5JCD9oRTWykWnJfHdbL9s%2BtS0xI4u0%3D&amp;reserved=0
*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=05%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C6e8fa03e0a7640fa63e508da3d387b35%7C4a5378f929f44d3ebe89669d03ada9d8%7C0%7C0%7C637889610614602990%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&amp;sdata=Od4r39dq3DFjx8VMmJkZimX4hT9t52ql432XUwkM%2ByI%3D&amp;reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20220524/6f911d7f/attachment-0001.html 


More information about the Eprints-tech mailing list