Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entry for maintenance mode removed from config.ini.php #8367

Closed
larsen0815 opened this issue Jul 17, 2015 · 3 comments
Closed

Entry for maintenance mode removed from config.ini.php #8367

larsen0815 opened this issue Jul 17, 2015 · 3 comments
Labels
answered For when a question was asked and we referred to forum or answered it.

Comments

@larsen0815
Copy link

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 #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).

tl;dr:

  • 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
Copy link

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
Copy link
Member

mattab commented Jul 22, 2015

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)

@mattab mattab closed this as completed Jul 22, 2015
@mattab mattab added the answered For when a question was asked and we referred to forum or answered it. label Jul 22, 2015
@larsen0815
Copy link
Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
answered For when a question was asked and we referred to forum or answered it.
Projects
None yet
Development

No branches or pull requests

3 participants