modmore / QuickstartButtons

Component for managing Quickstart buttons on your MODX manager Dashboard.
5 stars 7 forks source link

User without usergroup throws PHP fatal error: Call to member function getMany() on a non-object #40

Open pepebe opened 8 years ago

pepebe commented 8 years ago

I've just installed quickstart Buttons on artmetropol.tv.

Adding the default widget to the dashboard results in an error 500 for the dashboard page.

[Fri May 13 09:53:28 2016] [error] [client 217.236.176.172] PHP Fatal error: Call to a member function getMany() on a non-object in /home/www/web1/html/core/components/quickstartbuttons/model/quickstartbuttons/dashboardwidget.class.php on line 58, referer: https://example.com/manager/?a=system/dashboards

I had a quick look at the widget settings, but I can't see anything odd.

dashboardwidget.class.php also doesn't look odd.

58 $buttons = $set->getMany('Button', $c);

33 $set = $this->getActiveSet();

Cheers

Patrick

--- Want to back this issue? **[Post a bounty on it!](https://www.bountysource.com/issues/34190011-user-without-usergroup-throws-php-fatal-error-call-to-member-function-getmany-on-a-non-object?utm_campaign=plugin&utm_content=tracker%2F1189066&utm_medium=issues&utm_source=github)** We accept bounties via [Bountysource](https://www.bountysource.com/?utm_campaign=plugin&utm_content=tracker%2F1189066&utm_medium=issues&utm_source=github).
Mark-H commented 8 years ago

Interesting error, you did configure a set with buttons in the component?

pepebe commented 8 years ago

No, just a virgin install and then I tried to use the default button as a test ride.

pepebe commented 8 years ago

I'll try to reproduce this error on another 2.5 site and let you know what happens.

Mark-H commented 8 years ago

This is actually an issue where the user is not attached to a user group, and insufficient error handling in QSB to account for that.