Project

General

Profile

Bug #12278

Cannot acces dashboard due to "Critical Error"

Added by Laurie Hurson almost 2 years ago. Updated almost 2 years ago.

Status:
Resolved
Priority name:
Normal
Assignee:
Category name:
WordPress (misc)
Target version:
Start date:
2020-01-09
Due date:
% Done:

0%

Estimated time:

Description

I was just working with a faculty member who was building out their course site. When they changed the theme they could no longer access the dashboard and received the message about a "critical error".

Any insight on this? It might be a cache issue but i wanted to submit a ticket to see if there might be another explanation.

User: Stanley Chen
Site: https://www.aps2020.commons.gc.cuny.edu


Related issues

Related to CUNY Academic Commons - Support #13923: Request to update Dante themeResolved2021-02-01

History

#1 Updated by Boone Gorges almost 2 years ago

  • Status changed from New to Reporter Feedback
  • Target version set to Not tracked

A fatal error was being triggered by the dante-framework plugin. The plugin appears to be written in such a way that it cannot run (and throws a fatal error) when the Dante theme is not active.

I'm guessing that the user originally had Dante activated, and then switched away from it, but the plugin stuck around. Does that sound possible? (I've CCed Ray, because he's done work in the past on plugin and theme dependencies on the Commons.)

I have disabled the dante-framework plugin and the site's Dashboard is now accessible again.

#2 Updated by Laurie Hurson almost 2 years ago

This plugin/theme issue is likely the cause, thanks Boone! I was having faculty try out a few themes they might use for their spring course sites so this person probably activated/deactivated dante.

So, to clarify, if someone activates the dante theme the plugin also gets activated. But then, if they switch themes the plugin in not automatically deactivated? Is this typical or did something go wrong in this case?

If this is how it commonly works I will steer folks away the dante theme if just testing a few out and/or will know to tell them to deactivate the plugin first if they decide to switch.

#3 Updated by Boone Gorges almost 2 years ago

  • Assignee set to Raymond Hoh

So, to clarify, if someone activates the dante theme the plugin also gets activated. But then, if they switch themes the plugin in not automatically deactivated? Is this typical or did something go wrong in this case?

Yes, it sounds like this is what happened. Let's wait for Ray to chime in to see if he has more thoughts about whether this could be corrected. In the meantime, you might want to steer clear of the Dante theme.

#4 Updated by Raymond Hoh almost 2 years ago

I couldn't duplicate this locally.

I activated the Dante theme and it redirected me to Dante's theme options page. Next, I went back to "Appearance > Themes" to change the theme to something else and was able to switch back. No fatal errors. I tried this on a normal user account that is an administrator on a sub-site as well.

I did duplicate it on the development site though. I'm looking into it.

#5 Updated by Raymond Hoh almost 2 years ago

  • Category name set to WordPress (misc)
  • Status changed from Reporter Feedback to Resolved
  • Target version changed from Not tracked to 1.16.3

Figured out the problem.

The problem is two-fold:
1. In the theme-dependent plugin deactivation process, the code was looking for the wrong theme to check for dependent plugins. This was caused by me! sigh. Should be fixed as of https://github.com/cuny-academic-commons/cac/commit/f459fe083128a9583cac7e478813f2c23212d609
2. The theme-dependent plugin deactivation process relies on plugins being good citizens and ensuring that their plugin can run independent outside of the theme. This was not the case with the 'dante-framework' plugin as it throws a fatal error as reported in this thread. I've patched up 'dante-framework' in the following commit - https://github.com/cuny-academic-commons/cac/commit/fdbf1ba31bf3df62757fc78420b5c6ec1f8f5ac7. And have also sent an email to the 'dante' authors in hopes that they will patch up their plugin in a future release.

The good news is with the first fix applied, if there is a troublesome plugin again, you'll only see the fatal error once. When you reload the page, the page should load again.

I've deployed the two fixes on production as a hotfix.

Thanks for the report, Laurie!

#6 Updated by Laurie Hurson almost 2 years ago

Theme dependent plugins always seem risky to me, but probably because I only pay attention to them instances like this.

Thanks to you both for the insight and the quick fix!

#7 Updated by Boone Gorges almost 2 years ago

Thanks for your sleuthing, Ray!

#8 Updated by Raymond Hoh 10 months ago

Also available in: Atom PDF