Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FR] A safeMode config setting to disable all plugins & modules #5106

Closed
lindseydiloreto opened this issue Oct 15, 2019 · 12 comments
Closed
Labels
enhancement improvements to existing features site development 👩‍💻 features related to website/API development

Comments

@lindseydiloreto
Copy link
Contributor

lindseydiloreto commented Oct 15, 2019

Originally suggested by @khalwat on Discord...

It would be incredibly useful to have a config setting that neutralizes all plugins and modules. For the sake of this feature request, let's call it safeMode.

Use-Case 1

  • You want to report a bug in Craft, but want to be 100% sure that the bug isn't coming from a plugin or module (inspired by [BUG] Admin can't easily change email address #5088). Putting the site into safeMode allows you to instantly diagnose whether or not the bug is Craft's fault.

Use-Case 2

  • You did something, somehow, that is preventing you from using the CP normally. In many cases, a safeMode config setting would allow you to get back in there and fix your mistake.

There are probably more use-cases as well, but these are the first ones that come to mind.

@brandonkelly brandonkelly added site development 👩‍💻 features related to website/API development enhancement improvements to existing features labels Oct 16, 2019
@lindseydiloreto
Copy link
Contributor Author

Use-Case 3

  • You encounter a bug related to plugin settings which has completely locked up the control panel. There is no way to "hack" the plugin or database, because project config handles the plugin settings in a very specific way.

Real-world example:
doublesecretagency/craft-cpcss#12

@BenParizek
Copy link
Contributor

BenParizek commented Apr 13, 2020

The detail I miss most from having plugins stored in the database is that I could easily go into the db and toggle specific plugins on and off. It was useful for troubleshooting during plugin development and in various migration and upgrade scenarios.

Currently, I believe you can only do this if you have Project Config enabled and then you have to search through the file for each plugins enabled setting.

As you consider the "safeMode" feature it would be nice to also consider how this could be done on an individual-plugin basis, with or without Project Config enabled.

@lindseydiloreto
Copy link
Contributor Author

+1 to that... I really miss being able to toggle individual plugins on/off in the database.

@brandonkelly
Copy link
Member

If you just need to disable specific plugins, you can do that with the disabledPlugins config setting:

'disabledPlugins' => ['cp-css'],

@khalwat
Copy link
Contributor

khalwat commented Apr 13, 2020

Just as there's a way to boot into Safe Mode on Windows and on the Mac... I think it could potentially be useful here as well FWIW.

@lindseydiloreto
Copy link
Contributor Author

lindseydiloreto commented Oct 14, 2020

Watching someone flail on Discord right now... Would really love to be able to tell them to "put it in safe mode".

This person has a bizarre error which is almost certainly unique to their environment. It would help significantly if they could quickly rule out plugins & modules as a source of interference.

brandonkelly added a commit that referenced this issue Oct 14, 2020
@brandonkelly
Copy link
Member

We don’t have a non-hacky way of disabling modules, as those are part of the core application config, but I’ve just made it possible to set the disabledPlugins config setting to '*', which will disable all plugins.

@khalwat
Copy link
Contributor

khalwat commented Oct 15, 2020

That's pretty sweet @brandonkelly

@lindseydiloreto
Copy link
Contributor Author

Ah, solid! Totally fair that modules were excluded from this solution. Bulk disabling modules is easy enough, and would quickly lead to more complications anyway.

Thanks @brandonkelly! 🍺

@bencroker
Copy link
Contributor

Excellent!!

@brandonkelly
Copy link
Member

Craft 3.5.13 is out now with that change ✨

@khalwat
Copy link
Contributor

khalwat commented Oct 16, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement improvements to existing features site development 👩‍💻 features related to website/API development
Projects
None yet
Development

No branches or pull requests

5 participants