Loading...
 
Features / Usability

Features / Usability


available_languages bug?

posts: 2

Hi all,
I am using Tiki v1.9 RC3. It appears that if I select too many (>~15) available languages in Admin->Login, the user preferences page no longer loads. I did some digging and found that the value of the 'available_languages' preference in the tiki_preferences table was more than the alotted 250 characters. Since the string was being cut short, the unserialize method on line 302 of tiki-user_preferences.php was throwing an error.

For my purposes, there is no real need to have more than 15 languages available to users, but this seems like something that should be fixed.

Does anyone know if this is actually a bug, or if I just missed something obvious in my configuration?

Thanks,
David

posts: 1092

you are right!
The available languages are stored in a serialized variable in the table tiki-preferences that limits the variable value to 250 characters.
I don't think it makes sense to enlarge the preference value in the db structure.
Is the fix to use something else that "serialize" that uses not so many characters?
A quick fix is to check the value set in the db is not bigger than 250. I will do it

... you can always take away some languages by deleting the directory lang/xx if you dont' want xx (the method is described in http://doc.tikiwiki.org/tiki-index.php?page=Internationalization+Admin


posts: 2

ok, just making sure I'm not going crazy.

One thing that might help is to just change the format of the string that is held in the database.

All you really need is a ';' separated list of language codes. With that you could hold about 50 easily (assuming about 20 of them are two characters).

It would be fairly trivial to convert it into the serialized string if you needed it.

Thanks for confirming my findings.

-David


Upcoming Events

1)  18 Apr 2024 14:00 GMT-0000
Tiki Roundtable Meeting
2)  16 May 2024 14:00 GMT-0000
Tiki Roundtable Meeting
3)  20 Jun 2024 14:00 GMT-0000
Tiki Roundtable Meeting
4)  18 Jul 2024 14:00 GMT-0000
Tiki Roundtable Meeting
5)  15 Aug 2024 14:00 GMT-0000
Tiki Roundtable Meeting
6)  19 Sep 2024 14:00 GMT-0000
Tiki Roundtable Meeting
7) 
Tiki birthday
8)  17 Oct 2024 14:00 GMT-0000
Tiki Roundtable Meeting
9)  21 Nov 2024 14:00 GMT-0000
Tiki Roundtable Meeting
10)  19 Dec 2024 14:00 GMT-0000
Tiki Roundtable Meeting