@filippog opened this Issue on March 6th 2016

following up from #9861

The issue was that core:archive was silent because Monolog wasn't loaded. I'm using piwik but with config.ini.php from an earlier version so Monolog wasn't listed there, also I'm using the CLI during the upgrades with console core:update --yes --no-ansi.

My config lists Plugins and PluginsInstalled sections, is there a way to handle situations like this where e.g. Monolog is required?

@quba commented on March 7th 2016 Contributor

I confirm this one. Also had issues with Monolog not installed after upgrade.

@tsteur commented on March 7th 2016 Owner

'm using piwik but with config.ini.php from an earlier version so Monolog wasn't listed there

I'm not sure what you mean here. If you are using config.ini.php from an earlier version it cannot really work so far. You would basically have to reset the installed Piwik version saved in the database and execute the update again. The problem is that we cannot really know whether plugins are missing on purpose or whether they are missing because an older config file was used.

In general there is an update script for it here: https://github.com/piwik/piwik/blob/2.16.0/core/Updates/2.11.0-b5.php so it should have been activated when updating to Piwik 2.11 or newer.

@quba Have you experienced this with other plugins too? Is Diagnostics plugin enabled?

In general: Please make sure config file is writable for the updater.

@quba commented on March 8th 2016 Contributor

Not sure about the Diagnostics plugin. The bottom-line is that Monolog plugin simply wasn't installed after update (via core:upgrade) from some older Piwik version (I think it was 2.9.1) to 2.15.0. The config file was writable for the updater.

@tsteur commented on March 8th 2016 Owner

I tried to reproduce it 2 times to update from 2.9.1 to 2.16.0 via CLI and could not reproduce it.

First I updated without making any changes to plugins so it worked anyway since Monolog was activated indirectly via global.ini.php. There was no entry in for Plugins[] in config.ini.php.

So I installed 2.9.1 again, deactivated a plugin so I add a copy of Plugins[] in config.ini.php. I verified Monolog was not there. Then I updated via CLI to 2.16.0 again and Monolog was there.

I think what the issue creator @filippog mentioned is a different use case as an old config.ini.php was used with a newer Piwik version. In this case we cannot really detect such differences. I will close the issue for now but feel free to comment @filippog and I'm happy to reopen the issue again. Ideally, when using an old config file, it is recommended to use it with same old Piwik version and then perform an update again to latest version. If database was already used with a newer Piwik version, this does likely not work. Here it would be so far duty of the user to check if there are eg new plugins and to look over the changelogs. I hope we can improve this one day.

@filippog commented on March 10th 2016

that would explain it @tsteur, thanks! What about PluginsInstalled[] vs Plugins[] in config.ini.php ? Are they supposed to be the same or it is possible to have just one? thanks!

@tsteur commented on March 10th 2016 Owner

It's possible to have only PluginsInstalled[] after a fresh installation but as soon as you activate or deactivate another plugin it will copy the Plugins[] from global.ini.php to config.ini.php. Usually both are present. Plugins[] defines which are activated, PluginsInstalled[] the ones that are installed.

This Issue was closed on March 8th 2016
Powered by GitHub Issue Mirror