Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Try Vanilla Forums Cloud product
Vanilla 2.6 is here! It includes security fixes and requires PHP 7.0. We have therefore ALSO released Vanilla 2.5.2 with security patches if you are still on PHP 5.6 to give you additional time to upgrade.

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!

Sign In or Register to comment.