@Firesphere opened this Issue on November 16th 2016

After updating to beta 3, I get this error message. Nothing more.

@sgiehl commented on November 16th 2016 Member

Where, in which file and line?

@ehajo commented on November 16th 2016

Same here after update from 3.0.0-b2 to 3.0.0-b3:
Call to undefined method Piwik\Menu\MenuAdmin::add()

Link to screenshot

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, ..."

@Firesphere commented on November 16th 2016

Stack trace is empty in my server logs :(

@sgiehl commented on November 16th 2016 Member

Any third party plugins installed?

@Firesphere commented on November 16th 2016

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"

@ehajo commented on November 16th 2016

Thank you very much. Was also the BotTracker-Module here on my server.
Changed add to addItem and now it is working again :)

@sgiehl commented on November 16th 2016 Member

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

@Firesphere commented on November 16th 2016

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.

@huye commented on November 16th 2016

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); }

@Firesphere commented on November 20th 2016

@huye That kinda defies the whole idea of deprecating and removing the method, doesn't it?

@tsteur commented on November 20th 2016 Member

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

@mattab commented on December 6th 2016 Member

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

@unixfox commented on December 19th 2016

@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.

@Sebi94nbg commented on December 20th 2016

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);

@mattab commented on December 26th 2016 Member

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

This Issue was closed on December 26th 2016
Powered by GitHub Issue Mirror