OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



[SOLVED] Browse by Title alphabetical problem

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

[SOLVED] Browse by Title alphabetical problem

Postby hjolli » Wed Oct 23, 2013 10:13 am

I'm using OJS v.2.4.2 and there is a strange problem regarding Browse by Title. The titles are in a random order http://www.irpa.is/search/titles

Is there a setting or a module needed to be activated that will fix this or is this a bug?
I have searched everywhere and can't see that anybody else has had this problem.

I have also rebuilt the search Index (php tools/rebuildSearchIndex.php) but that didn't solve this problem.

Browse by Issue works fine and Browse by Author has only a little problem (one author appears also outside the alphabet) http://www.irpa.is/search/authors

This journal has articles both in English and Icelandic if that might have something to do with it.
Last edited by hjolli on Thu Oct 24, 2013 5:13 am, edited 1 time in total.
hjolli
 
Posts: 2
Joined: Wed Oct 23, 2013 8:36 am

Re: Browse by Title alphabetical problem

Postby asmecher » Wed Oct 23, 2013 4:48 pm

Hi hjolli,

If you're handy with SQL, can you investigate this a little further?

OJS stores article titles in the article_settings table, with setting_name = 'title'. There's a secondary title called the "clean title" that's also stored there, but in a separate row with setting_name='cleanTitle'. That latter setting is what's used for sorting, so if it's missing, obviously the sort will be out of order. Could you check if the cleanTitle entries are present? What is your installation's version history, i.e. was it upgraded from an earlier release?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm

Re: Browse by Title alphabetical problem

Postby hjolli » Thu Oct 24, 2013 5:12 am

Hello asmecher

OJS was first installed with version 2.4.0, then upgraded to 2.4.1 and is now 2.4.2.

The cleanTitle is there and if I connect to the database and execute this:
Code: Select all
select * from article_settings where setting_name = "cleanTitle";

it shows me everything in alphabetical order.

Ah, I just found out what the problem is and it's the way the articles were put into the database. It is actually not in a random order, but there is a white space and new lines in front of some of the titles, hence they appear at the top of the list, now I just have to do some clean up.

Thank you for pointing me in the right direction :D

This showed me what was causing the problem:
Code: Select all
mysql> select * from article_settings where setting_name = "cleanTitle" and article_id < "1000";
+------------+--------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+
| article_id | locale | setting_name | setting_value                                                                                                                                                        | setting_type |
+------------+--------+--------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------+--------------+
|        913 | en_US  | cleanTitle   |
   Excellence Innovation and Academic Freedom in University Policy in Iceland
                                                                                        | string       |
|        889 | is_IS  | cleanTitle   |
   Sá veit gjörst hvar skórinn kreppir að sem hefur hann á fætinum
                                                                                                         | string       |
|        887 | is_IS  | cleanTitle   |
   Staða utanríkismálanefndar Alþingis í ljósi Íraksmálsins
                                                                                                                | string       |
|        888 | is_IS  | cleanTitle   |
   Straumar stjórnleysi og stefnurek Hvað er til ráða
                                                                                                                      | string       |
|        886 | is_IS  | cleanTitle   |
   Vald forseta sem handhafa framkvæmdarvalds
                                                                                                                              | string       |
|        964 | is_IS  | cleanTitle   |
Björn Jónsson: Fyrsti vesturíslenski feministinn  þættir úr baráttusögu Margrétar J Benedictsson
                                                                  | string       |
|        979 | en_US  | cleanTitle   |
Democracy: An analytical framework                                                                                                                                  | string       |
|        885 | is_IS  | cleanTitle   |
Geta aðferðir mannauðsstjórnunar aukið gæði ráðninga hjá hinu opinbera                                                                                              | string       |
|        966 | is_IS  | cleanTitle   |
Kristín Jónsdóttir: Hlustaðu á þína innri rödd  Kvennaframboð í Reykjavík og Kvennalisti 19821987
                                                                 | string       |
|        884 | is_IS  | cleanTitle   |
Löggjöf um opinberar starfsveitingar                                                                                                                                | string       |
|        965 | is_IS  | cleanTitle   |
Sigmundur Ernir Rúnarsson: Guðni af lífi og sál  saga þjóðar manns og stormasamra átaka
                                                                           | string       |
|        978 | en_US  | cleanTitle   |
Strategic management of nonprofit organizations                                                                                                                     | string       |
|        977 | en_US  | cleanTitle   |
The Icelandic states online web services                                                                                                                            | string       |
|        976 | en_US  | cleanTitle   |
The position of the political parties before the general election in 2007 from a marketing perspective                                                              | string       |
|        883 | en_US  | cleanTitle   |
The Use of Armed Force Weapons of Mass Destruction and the UN                                                                                                       | string       |
|        980 | en_US  | cleanTitle   | 'Societal Security' and Iceland EN                                                                                                                                   | string       |
|        945 | is_IS  | cleanTitle   | Á svig við góða stjórnhætti Vandi þess að virkja opinberar auðlindir                                                                                                 | string       |
|        989 | en_US  | cleanTitle   | Act on Trade Unions and Industrial Disputes No 80/1938 70th anniversary                                                                                              | string       |
|        949 | is_IS  | cleanTitle   | Afnám einkasölu áfengis Yfirlit yfir rannsóknir á breytingum á áfengissölu                                                                                           | string       |
|        932 | is_IS  | cleanTitle   | Áhrif 11 september 2001 á NATO Öryggi og ógnir í öðru ljósi                                                                                                          | string       |
|        914 | is_IS  | cleanTitle   | Áhrif hvata á störf lækna                                           

hjolli
 
Posts: 2
Joined: Wed Oct 23, 2013 8:36 am

Re: [SOLVED] Browse by Title alphabetical problem

Postby asmecher » Thu Oct 24, 2013 9:04 am

Hi hjolli,

Good spotting -- glad you're back on track.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8869
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], Yahoo [Bot] and 5 guests

cron