I update piwik with subversion and use the two parameters record_statistics and maintenance_mode during the update process. After updating to 1.9 the config.ini.php was changed (for example new row Plugins = “Transitions”). Almost all of my previous data was still in the file but not the two parameters record_statistics and maintenance_mode. So I manually have to include those parameters. Is that normal?
Or should overwrite the new config.ini.php with my backup one from the previous version because the new data (for example new row Plugins = “Transitions”) is already written to the global.ini.php?
Yes it’s “By design” I agree it can be annoying, what happens is Piwik will remove all values from your config file which are the same in global.ini.php
to work around this, instead of setting to 1 and 0, you can rename the config setting once you’ve used it (for example append a _) and then it will stay in your config.ini.pph
I think it doesn’t work in that way. The two parameters record_statistics and maintenance_mode were introduced to ensure that
- the database remains consistent while backing up and updating and
- the piwik users cannot start the database update in the gui during the update process
Before my update I changed
maintenance_mode = 1
record_statistics = 0
Then I backed up the database. --> Ok so far.
Then I switched to the new version with subversion. The parameters record_statistics and maintenance_mode were deleted from the config.ini.php. --> Piwik users could do the database update in the gui. New site views are counted!
I included the two parameters.
Then I did the database update in the console. After that the parameters record_statistics and maintenance_mode were deleted again from the config.ini.php. --> Piwik users could login to the gui and see - perhaps - errors in the new version. New site views are counted!
Is there a way to let the two parameters in the config.ini.php? Others like
use_custom_logo = 1
also remained. Perhaps because the value in the global.ini.php was 0? But the values for the two parameters in the global.ini.php differed too:
maintenance_mode = 0
record_statistics = 1
So I suppose variables with the same name and value are deleted. But it doesn’t work with the two parameters record_statistics and maintenance_mode and that is not so good.