EPrints Technical Mailing List Archive
Message: #08974
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
Re: [EP-tech] Browse by year
- To: Francis Jayakanth <fjayakanth@gmail.com>
- Subject: Re: [EP-tech] Browse by year
- From: David R Newman <drn@ecs.soton.ac.uk>
- Date: Thu, 2 Jun 2022 10:33:53 +0100
Hi Francis,
It would be useful if you could send me a copy of your archive's cfg/cfg/views.pl, in particular the configuration that relates to the year view. Also it would be useful if you could check that your version of perl_lib/EPrints/Update/Views.pm is the same as that released for 3.4.1:
I just tried download this and it had the MD5Sum 4efc78896232d8f912a54998b367d09c, so you may want to check that is the case for this file on your EPrints repository server or carry out a diff against your file and the one available at the URL above. In particular the following line (626 for the file in the URL above):
my $null_phrase_id = "viewnull_".$ds->base_id()."_".$view->{id};
Regards
David Newman
CAUTION: This e-mail originated outside the University of Southampton. Hi David, Thank you for your advice. Unfortunately, the problem has not been resolved. The phrase 'Not Specified' is correctly defined in https://eur03.safelinks.protection.outlook.com/?url="">. As a result, I attempted the second method of generating the zzz_iisc.xml file in the cfg/lang/en/phrases/ directory of the archive and including all of the content you mentioned. I regenerated the view when the file was created, reloaded and refreshed the repository, and ultimately restarted the webserver, but the 'Not Specified' phrase does not appear in the 'year' view. With regards, Francis On Tue, May 31, 2022 at 5:42 PM David R Newman <drn@ecs.soton.ac.uk> wrote:Hi Francis, You should not need it in local.xml as well. However, what normally happens is somewhere else sets the phrase to an empty string. There are two options to try definitively override this: 1. Find the phrase in https://eur03.safelinks.protection.outlook.com/?url=""> and edit it to set it to "Not Specified". This will almost definitely override it but if not try 2. 2. Create a file in your archive's cfg/lang/en/phrases/ directory called zzz_iisc.xml with contents something like: <?xml version="1.0" encoding="utf-8" standalone="no"?> <!DOCTYPE phrases SYSTEM "entities.dtd"> <epp:phrases xmlns=MailScanner has detected a possible fraud attempt from "www.w3.org" claiming to be "http://www.w3.org/1999/xhtml" xmlns:epp="https://eur03.safelinks.protection.outlook.com/?url=""> xmlns:epc="https://eur03.safelinks.protection.outlook.com/?url="">> <epp:phrase id="viewnull_eprint_year">Not Specified</epp:phrase> </epp:phrases> Once you have made these changes you will need to regenerate the view with the command I provided in an earlier email or reload EPrints (i.e. reload or restart the webserver) and then run: EPRINTS_PATH/bin/epadmin refresh_views ARCHIVEID Regards David Newman On 31/05/2022 12:30 pm, Francis Jayakanth via Eprints-tech wrote: CAUTION: This e-mail originated outside the University of Southampton. Hi, David, thank you. The following phrase does exist in the system.xml file. <epp:phrase id="viewnull_eprint_year">Not Specified</epp:phrase> I'm also using the local.xml file. Should the above entry be included in the local.xml file as well? Best regards, Francis On Tue, May 31, 2022 at 2:50 PM David R Newman <drn@ecs.soton.ac.uk> wrote: Hi Francis, I was able to manually find this as I knew your repository hostname. I am pretty sure the issue is the missing phrase I suggested in my earlier email. As I can see that there is a link to NULL.html for this item when I look at the HTML but it has no text so the link is not clickable. Once you have re-added the viewnull_eprint_year phrase, you will also need to regenerate this browse view page. This can be done with the following command (substituting EPRINTS_PATH and ARCHIVEID as appropriate): EPRINTS_PATH/bin/generate_views ARCHIVEID --view year --generate menus Regards David Newman On 31/05/2022 10:10 am, Francis Jayakanth wrote: CAUTION: This e-mail originated outside the University of Southampton. Hi David and Chris, Thank you for responding so quickly. Please accept my apologies for the jumbled screenshot URL. Please see https://eur03.safelinks.protection.outlook.com/?url=""> for a browse view by year. The last item in the third column of the above image is what I'm referring to. I was able to obtain entries with NULL values in the date_year field, but not those in the browse view that are unclickable. Best regards, Francis On Tue, May 31, 2022 at 1:33 PM David R Newman <drn@ecs.soton.ac.uk> wrote: Hi Francis, Your screenshot URL got a bit mangled. I am not sure how you could have a row in year view that is not clickable. The date_year field used in the year browsw view in the eprint record is an integer. If you set it to a value that is not an integer (including just spaces) the year will be set to 0 and appear as 0000 in the browse view. If you set to an integer greater than 9999, then this year be concatenated to the first four digits (e.g. 12345 becomes just 1234*). If you set an integer less than 1, then the year will show as 0000 in the browse view. Finally, if no value is set, the database will store this as null and the link in the browse view should show as "Not Specified". This is provided by the following line in lib/lang/en/phrases/system.xml: <epp:phrase id="viewnull_eprint_year">Not Specified</epp:phrase> Maybe you don't have this phrase but I think it has been present at least since the first release of EPrints 3.4. Maybe you set this phrase to empty for some reason. Most likely it was showing "Not Specified" in some place that looked untidy, Regards David Newman *This is technically a bug but unlikely to ever be an issue unless something wei On 31/05/2022 8:28 am, Francis Jayakanth via Eprints-tech wrote: CAUTION: This e-mail originated outside the University of Southampton. Hi, Values for the date_year column in roughly fifty records in our repository may not be inserted correctly. As a result, the 'browse by year' view for such entries is incorrectly created and not clickable. The following link will take you to a screenshot of the browse view by year: https://eur03.safelinks.protection.outlook.com/?url=""> iisc ac in/EQhONAS12hxMseEf7e8lHMUBU0D8IuwQhdbkLrekIGJj1g?e=e1yxHP As evident from the screenshot, the last item in the third column is not clickable. What SQL statement should I use to obtain these records? I've tried the SQL commands below, but they all return empty sets: select eprintid, title, official_url from eprint where date_year like ' %'; select eprintid, title, official_url from eprint where date_year like ' % ' select eprintid, title, official_url from eprint where date_year like ' % ' Thanks for your attention. Best regards, Francis *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: https://eur03.safelinks.protection.outlook.com/?url=""> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=""> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech *** Archive: https://eur03.safelinks.protection.outlook.com/?url=""> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url="">
- References:
- [EP-tech] Browse by year
- From: Francis Jayakanth <fjayakanth@gmail.com>
- Re: [EP-tech] Browse by year
- From: Francis Jayakanth <fjayakanth@gmail.com>
- Re: [EP-tech] Browse by year
- From: Francis Jayakanth <fjayakanth@gmail.com>
- Re: [EP-tech] Browse by year
- From: Francis Jayakanth <fjayakanth@gmail.com>
- [EP-tech] Browse by year
- Prev by Date: Re: [EP-tech] Browse by year
- Next by Date: [EP-tech] Bug in Subject.pm?
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):