Bug 12002 - Koha does not pick up installed languages when running under Plack
Summary: Koha does not pick up installed languages when running under Plack
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: I18N/L10N (show other bugs)
Version: master
Hardware: All All
: P5 - low normal (vote)
Assignee: Robin Sheat
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-03-26 20:45 UTC by Magnus Enger
Modified: 2015-12-03 22:00 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Magnus Enger 2014-03-26 20:45:15 UTC
I took a database from an existing package install and dumped it into an installation running under Plack (which is a gitified package-install, to be exact). After doing this, when I go to the I18N tab of the systempreferences I do not see any other languages than "en" as options for the "language" and "opaclanguages" sysprefs. 

Translations are installed on the server:
$ sudo koha-translate -i nb-NO
Error: the selected language is already installed. Try --update if you want to re-install it.

Updating the translations does not have any effect. 

I have this in the db:

mysql> select variable, value from systempreferences where variable = 'language' or variable = 'opaclanguages';
+---------------+------------------------------------+
| variable      | value                              |
+---------------+------------------------------------+
| language      | sv-SE,en                           |
| opaclanguages | sv-SE,en,fr-FR,de-DE,es-ES,ar-Arab |
+---------------+------------------------------------+

I restarted MySQL and memcached, without any effect.
Comment 1 Robin Sheat 2014-03-26 21:18:12 UTC
I'm working on fixes for plack for the staff client, so I'll look into this.
Comment 2 Robin Sheat 2014-04-02 02:38:14 UTC
I can't reproduce this at all using master. If I koha-translate --install or --remove, it updates immediately. This is using plack and memcached. In C4::Languages, getTranslatedLanguages is memoised, but I can't see it actually getting stored in memcache, oddly enough.

I think that's not the issue, given you restarted memcache. Did you also restart starman, and what was the result of that? How many workers are you running? Are you running plack on the staff client or just the opac?
Comment 3 Brendan Gallagher 2014-10-09 15:13:17 UTC
Hmm...  I was not able to repeat this.  I've got starman and memcached running.
Comment 4 Magnus Enger 2014-10-09 17:33:39 UTC
I'm about to add Plack as an option to https://github.com/digibib/kohadevbox I'll see if I can reproduce the problem when I get a little bit further with that.
Comment 5 Jonathan Druart 2015-04-28 09:05:38 UTC
Considered as fixed/invalid.
Magnus, feel free to reopen if you recreate the error later.