Sometimes, one of your dashboard widgets causes trouble. This can make the Manager's dashboard crash, occasionally to the point where the Manager is unusable. In this article, we'll look at some ways around that.
When you log in, the Manager launches the dashboard, which includes all the widgets on your assigned dashboard (usually, the default dashboard). Maybe you've upgraded and one of your widgets is not compatible with the new MODX code. Or maybe the
modx.com site isn't responding when the News or Security widgets request updates. If the Manager CSS or JS doesn't get loaded before the crash occurs, things can get pretty ugly in the Manager. I some cases, you may get a completely blank screen.
The First Thing to Try
Try going to this URL with your browser (change
yoursite.com to your actual site URL):
After filling out the Login form, that should take you directly to System (gear icon) -> Dashboards, bypassing the login dashboard altogether. At this point, you should actually be able to work in the Manager for as long as you like, as long as you never go to the main dashboard. That won't solve the problem, though. The next time you login in, you'll go right to the dashboard and the Manager will crash again.
The reason I suggested this URL is that the Dashboard panel is the place to create a temporary fix for the problem. Follow these steps:
- Make sure you're on the "Dashboards" tab
- Right-click on your main dashboard
- Select "Update Dashboard"
- (at this point, you should see a list of that dashboard's widgets)
- Right-click on each one and select "Remove Widget from Dashboard"
- Click on the "Save" button
- Log out
- Manually delete all files in the
- Log back in
Don't worry, this won't remove any widgets, it will just take them off the dashboard. You can put them back later. If any of the widgets are extras, check Extras -> Installer to see if there are available upgrades.
If you're feeling lucky and you think you know which widget is the culprit, you can just remove that one. If you're wrong, you can try the URL trick again.
Once the Manager looks normal after logging in, you can start putting the widgets back on the dashboard, one by one, to see which one is causing the problem.
What if that Doesn't Work
In a worst-case scenario, you can remove the widgets from the dashboard in the database in PhpMyAdmin. You can just delete all the records in the
modx_dashboard_widget_placement table. This is the equivalent of the steps above, except that if you have more than one dashboard, the widgets will be removed from all of them. Be sure to manually delete the cache files before trying to log in. Again, this won't delete any widgets, it will just remove them from the dashboard(s) and you can put them back later.
In the next article, we'll look at how to use
$modx->regClientScript() to inject code without getting the
Looking for high-quality, MODX-friendly hosting? As of May 2016, Bob's Guides is hosted at A2 hosting. (More information in the box below.)