After updating to beta 3, I get this error message. Nothing more.
Where, in which file and line?
Same here after update from 3.0.0-b2 to 3.0.0-b3:
Call to undefined method Piwik\Menu\MenuAdmin::add()
That screen appears after installing it with auto-update.
Downgrade to b2 is not possible because the screen than say something like "update in process, b3 already installed, ..."
Stack trace is empty in my server logs :(
Any third party plugins installed?
Found it, took me some grep magic, but it's in PerformanceMonitor and BotTracker module indeed.
Sorry for not getting back sooner, didn't have time.
If you use a third party plugin, run the following grep command to find the usages of the old add method and either comment out the lines, or update them, until the makers of the plugin fix it.
grep -rnw '.' -e "menu->add"
Thank you very much. Was also the BotTracker-Module here on my server.
Changed add to addItem and now it is working again :)
Maybe it would be useful for the plugin developer to know that. Could you create issues in their repos?
e.g. https://github.com/Thomas--F/BotTracker
Bottracker is already updated for Piwik 3, but somehow not showing up as an update. So completely uninstall and remove, then upload a zip from the repository fixes the issue as well.
PerformanceMonitor seems to be unmaintained.
I added the following content to the file ( piwik/core/Menu/MenuAdmin.php ):
public function add($menuName, $subMenuName, $url, $order = 50, $tooltip = false)
{
return parent::addItem($menuName, $subMenuName, $url, $tooltip, $order);
}
@huye That kinda defies the whole idea of deprecating and removing the method, doesn't it?
FYI: The plugin BotTracker doesn't show up for Piwik 3 because it currently requires a fixed PHP version of "5.3.10". I will send a PR to fix this
I'm leaving this issue opened as maybe our Safe mode should have been displayed to let user disable easily plugin. Haven't tried to reproduce but I suspect Safe mode wasn't displayed for you?
Safe mode looks like this: https://media.githubusercontent.com/media/piwik/piwik/3.x-dev/tests/UI/expected-screenshots/UIIntegrationTest_fatal_error_safemode.png
@mattab Safe mode isn't displayed for me too.
I disabled all of my optional plugins and I found that the plugin Counter caused the problem.
You can prevent this issue by disabling the PerformanceMonitor before you update Piwik. Leave it disabled until PerformanceMonitor gets an update, which fixes this issue.
Otherwise, you need to comment out the line plugins/PerformanceMonitor/Menu.php:21 in order to disable the PerformanceMonitor:
// $menu->add('PerformanceMonitor_PerformanceSummary', null, $urlParams, true, 3, $tooltip);
in the next Piwik version, the safe mode will be displayed for such errors (done in #11082 ). Closing as it's caused by a third party plugin
Most helpful comment
Found it, took me some
grepmagic, but it's in PerformanceMonitor and BotTracker module indeed.Sorry for not getting back sooner, didn't have time.
If you use a third party plugin, run the following grep command to find the usages of the old add method and either comment out the lines, or update them, until the makers of the plugin fix it.
grep -rnw '.' -e "menu->add"