@tsteur opened this Issue on June 30th 2017 Member

When looking for an update in core:update we first invalidate the cache here: https://github.com/piwik/piwik/blob/3.0.4/plugins/CoreUpdater/Commands/Update.php#L52

However, all plugins are already loaded from cache including their metadata. So for the updater to notice an update, the command needs to be loaded twice.

To fix this, when invalidating the cache, we could iterate over all plugins and reload plugin information like this:

$pluginManager = PluginManager::getInstance();
foreach ($plugins as $plugin){ 
            if ($pluginManager->isPluginLoaded($plugin)) {
                $plugin = PluginManager::getInstance()->getLoadedPlugin($plugin);
                if (!empty($plugin)) {

I presume we could do this eg in Filesystem::deleteAllCacheOnUpdate?

This Issue was closed on July 17th 2017
Powered by GitHub Issue Mirror