Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

Undefined method Gdn_Statistics::IsEnabled() / {dashboard_link} directing to the wrong url

Hi fellow Vanilla users!

I'm getting ready to upgrade forum and hoping to make it go as smooth as possible. I've got 2.5 (dev) and 2.3 (live) running in parallel but after running utility/update on the development database I click the dashboard link and get bounced to /dashboard/settings.

The error is as follows:

Call to undefined method Gdn_Statistics::IsEnabled()
The error occurred on or near: /home/paulus/
71:       $Sender->FireEvent('DefineAdminPermissions');
72:       $Sender->Permission($Sender->RequiredAdminPermissions, '', FALSE);
73:       $Sender->AddSideMenu('dashboard/settings');
75:       if (!Gdn_Statistics::IsEnabled() && Gdn_Statistics::IsLocalhost()) {
76:          $Sender->Render('dashboardlocalhost', '', 'plugins/VanillaStats');
77:       } else {
78:          $Sender->AddJsFile('plugins/VanillaStats/js/vanillastats.js');
79:          $Sender->AddJsFile('plugins/VanillaStats/js/picker.js');

The function does appear to be in the class, and we are using the {dashboard_link} placeholder for the link to the admin area, which still seems to be the best practice in the other themes that ship with Vanilla.

I can access the new-fangled admin area by adding /home to the URL.

It looks like 'dashboard/settings' rather than 'dashboard/settings/home' is hardcoded into the Gdn_Theme->link() method.

Maybe having worked through this to right the point that I'm ready to post it, it might be better placed on Github!


  • Options

    Strange, this is still a problem for me in the 2.6 release.

Sign In or Register to comment.