@larsen0815 opened this Issue on July 17th 2015

I couldn´t reproduce this every time on each update or when exactly it happens, but Piwik sometimes removes the line "maintenance_mode" from my config.

In https://github.com/piwik/piwik/issues/3871, @mattab stated that "maintenance automatically turned off after successful upgrade", but I couldn´t notice this behaviour. At least, the entry was still there the last x updates, but now (2.13.1 -> 2.14.1) it was removed.

The FAQ http://piwik.org/faq/how-to/#faq_111 mentions "When the Piwik update is finished, do not forget to re-enable Visit Tracking and/or the User Interface." so either this information is outdated or maintenance is indeed not automatically turned off (which I would prefer as the admin should be in control and might want to check things before turning the maintenance mode off manually).


  • Piwik should not automatically disable maintenance mode
  • If this is not wanted, Piwik should at least not remove the line from the config.ini.php but change it to "... = 0"
  • Also, the FAQ would need to be changed then
@gaumondp commented on July 17th 2015

I'm always upgrading from SSH.

What I've saw on my installation is that after upgrading and changing value to "1" in "record_statistics = 1" manually, the whole line gets deleted from config.ini.php.

I saw that happen at least on my last 2 updates.

@mattab commented on July 22nd 2015 Member

Hi there,

it's actually by design. In INI file, we remove the config settings values when they are set to the default value. This is done to keep the INI file minimal and for some other reason. if you don't want Piwik to remove your INI settings, you can for example prepend a letter or keep_ in front of the setting name.

In #3871, @mattab stated that "maintenance automatically turned off after successful upgrade", but I couldn´t notice this behaviour.

my comment is not correct. The FAQ is our official guide (rather than my comment in an issue) so http://piwik.org/faq/how-to/#faq_111 has the correct info (ie. that you need to manually disable maintenance mode)

@larsen0815 commented on July 22nd 2015

A program should never mess with a user-defined file.
What if the user explicitly sets a value to make sure that this setting is used and then your default is changed for whatever reason? This won´t work.

What need is there to keep an ini file minimal? I have never seen an ini file from any program bigger than some kilobytes.

In this case, this behaviour disturbed my workflow when updating.

This Issue was closed on July 22nd 2015
Powered by GitHub Issue Mirror