@eldk opened this Issue on November 1st 2016

Hello,

  • Piwik 3 beta 2 and previous stable releases

Disable "LanguageManager" needs to modify global.ini.php .

;Plugins[] = LanguagesManager

Disable it in config.ini.php is not enought.

As global.ini.php should be overwritten when update ... This should be corrected.

https://github.com/piwik/piwik/issues/9404 .

One error message is given too when checking Piwik conf from "https://domain.tld/index.php?module=Installation&action=systemCheckPage "

Différence de taille de fichier : /way/to/global.ini.php (longueur attendue: 40262, rencontrée : 40263)

Thanks,

Eric

PS : once done, default_language = "xx" in config.ini.php is well handle

@tsteur commented on November 1st 2016 Owner

This is definitely a bug as LanguagesManager is currently marked as a plugin to be always activated : https://github.com/piwik/piwik/blob/2.17.0/core/Plugin/Manager.php#L81

We would probably need a different setting instead to disable the language drop down and to use a hard coded fix language.

Language has a very big impact on using an app and therefore it would be nice to fix this in Piwik 3.

Maybe we could introduce a new setting eg force_language = en|de|fr|...?

@sgiehl any opinion?

@sgiehl commented on November 1st 2016 Member

disabling the plugin maybe worked in older versions. The LanguageManager plugin now also handles settings like usage of 12/24 hour clock and other stuff.
Guess a new setting in config to disable the language selection would be enough as the setting default_language should be enough to "force" the language then.

@gaumondp commented on November 1st 2016

If the non-existing plugin in #10709 (Remove many languages from language selector) was there, maybe it would solve @eldk problem.

@sgiehl commented on November 1st 2016 Member

Hm. Guess the mentioned plugin would be interesting instead. I'll give it a try...

@sgiehl commented on November 1st 2016 Member

Just released a small plugin that is able to restrict the language selector list: http://plugins.piwik.org/RestrictLanguageSelection?piwikversion=3

So maybe we now only remove the comment in global config that it's possible to force a language?
Using the new plugin and the default_language setting should do the same

@eldk commented on November 2nd 2016

Thanks,
I will test it fast (today).
Eric

@gaumondp commented on November 2nd 2016

I just tested the Piwik 2.x version with success !

My only problem is that I had to clear cache from console after activation of the plugin.

Note that my server can't reach the internet so I have to copy the zip file, unzip then go to Piwik interface. Should I fill a bug report/suggestion that before activation Piwik should clear cache ? I'm lucky and have SSH access so I was able to easily do a console core:clear-cache.

Many thanks !

@eldk commented on November 2nd 2016

Hello,

I have installed the new plugin on 3b2 Piwik.

I yet have one alert on global.ini.php : "Échec du contrôle d'intégrité : /home/neptune/public_html/piwik/config/global.ini.php"

The diff is :

--- /home/eric/Téléchargements/global.ini.ori.php (from Github 3 b2 branch - https://raw.githubusercontent.com/piwik/piwik/3.x-dev/config/global.ini.php)
+++ /home/eric/Téléchargements/global.ini.mine.php
@@ -244,7 +244,7 @@

; if you want all your users to use Piwik in only one language, disable the LanguagesManager
; plugin, and set this default_language (users won't see the language drop down)
-default_language = en
+default_language = fr

; default number of elements in the datatable
datatable_default_limit = 10
@@ -800,7 +800,6 @@
Plugins[] = Insights
Plugins[] = Morpheus
Plugins[] = Contents
-Plugins[] = TestRunner
Plugins[] = BulkTracking
Plugins[] = Resolution
Plugins[] = DevicePlugins
@@ -828,5 +827,3 @@
SDK_interval_value = 30

So I add : Plugins[] = TestRunner

Then it give one error on size:
"Différence de taille de fichier : /home/neptune/public_html/piwik/config/global.ini.php (longueur attendue: 40262, rencontrée : 40285)"

But it works.

Thanks,

Eric

@sgiehl commented on November 2nd 2016 Member

@eldk You should never change anything in global.ini.php as that file holds the default values and will be overwritten with an update.
If you like to change a value, add it in config.ini.php (within the correct section) instead, that will overwrite the default from global.ini.php.

Is that plugin enough to solve what you liked to do? If so, guess we could close this issue after removing/changing the comment in https://github.com/piwik/piwik/blob/3.x-dev/config/global.ini.php#L245-L246

@eldk commented on November 3rd 2016

Hello @sgiehl ,

I have reset default_language = en in global.ini.php : no more error in file check.

I have only enable one language with the new plugin.

Then disable "Languagemanager" in config.ini.php :

  • for logged users : no more language selector as expected.
  • for anonymous users (public stats) : language selector is still there.
    --- caches where disabled in Piwik, on server side and browser

@sgiehl

The LanguageManager plugin now also handles settings like usage of 12/24 hour clock and other stuff.

If "LanguageManager is needed :
I think this is another concern : " Language selector is shown even if only one language is set/used with http://plugins.piwik.org/RestrictLanguageSelection?piwikversion=3". https://github.com/piwik/piwik/issues/10830

Thanks,

Eric

@mattab commented on November 3rd 2016 Owner

we could close this issue after removing/changing the comment in https://github.com/piwik/piwik/blob/3.x-dev/config/global.ini.php#L245-L246

This Issue was closed on November 4th 2016
Powered by GitHub Issue Mirror