EPrints Technical Mailing List Archive
Message: #08969
< 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: <eprints-tech@ecs.soton.ac.uk>, Francis Jayakanth <fjayakanth@gmail.com>
- Subject: Re: [EP-tech] Browse by year
- From: David R Newman <drn@ecs.soton.ac.uk>
- Date: Tue, 31 May 2022 13:12:29 +0100
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://eprints.iisc.ac.in/cgi/users/home?screen=Admin%3A%3APhrases
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="http://eprints.org/ep3/phrase"
xmlns:epc="http://eprints.org/ep3/control">
<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
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>
- [EP-tech] Browse by year
- Prev by Date: Re: [EP-tech] Browse by year
- Next by Date: [EP-tech] EPrints 3.4.4 release schedule
- Previous by thread: [EP-tech] Sort view with creators_name and corp_creators
- Index(es):