Maybe there is a problem with a plugin. You want to use it but need to disable it for some reason. To disable it you need to rename or move the plugin folder so Kirby can not use it.
If I understand you correctly the widget would list the plugins and by choice deactivate it by renaming the folder to some prefix? Maybe add a . as prefix before the folder name. That should not collide with active plugins.
If that is what you mean, I think it’s an interesting idea. A good workaround.
I still think this suggestion is still relevant, because it can be done in a simple way even without a UI.
Yes, it would be nice to have a panel widget for that.
Even if they implement my config suggestion you could still have your widget. It would still work and it would probably be easy to change it to the new syntax if you would want that.
This might work, but I think plugins for Kirby are way different than plugins for Wordpress. There are a lot of plugins which are, once installed, not as easy to remove as just renaming the folder, because different parts of the site are totally dependent on them. When you are using for example the relative date plugin (http://getkirby-plugins.com/relative-date), using the function which is never defined would cause the site or certain pages to break. So one have to be really aware of what he or she is doing if deactivating plugins. For others, like auto publish or the MinifyHTML plugin, it would work of course.
Agree! That’s why I think my config suggestion is good for the core and the widget is good for a plugin. It would then be optional to add the widget, as it’s not a built in thing.
To be honest, I don’t really see the use case for a widget; it just adds stuff to the panel that is not really helpful there (Wordpress, Joomla etc. way of adding bloat).
As regards the config setting, I’m not really sure that is needed either. Ok, the advantage to moving the plugin would be to keep it in place. But I don’t know if that use case is so important to have yet another setting in the config file.
Let’s say you have a problem with the site. You have 20 plugins and want to know which one that make the problems. Then it could be nice to, by code deactivate them instead of rename 20 folders.
I agree that the widget is not the Kirby way. For a plugin yes, but not for the core. I’m always very open minded about plugins because they never do any harm. I mean, you are never forced to install them. If you don’t like them, don’t use them.
If you have 20 plugins installed and you have a problem with one of them and you don’t know which one, how do you disable them one by one? Rename all the folders?
If you temporarly want to deactivate a plugin, what do you do? Rename the folder?
Maybe my solution is not the best one, but I think the problem is real.
…or rename it temporary, in order to check for the results.
But when you’ve a plug-in that installs several folders, in several locations - throwing / renaming the “main” folder also causes issues (when the plug-in itself is not checking for it’s own integrity).
So the best way - for now - is a manual solution… and not installing too many plug-ins.
For two of the plugins, I’ve built in an option to disable them already. Unfortunately, far from all plugins a disable feature.
In the config.php, It’s much simpler to have one option to control all the plugins, than having a unique config for every plugin that supports disabling.
Imagine 300+ plugins with the support for a disable option. Compare the extra code and work to if it was done in the core 1 time.
fwiw, this is pretty much the use case I’m looking to solve too - there are several plugins that I do not want to run in local dev, but do want in production
Note that the alternative is no longer developed, either.
This plugin can also be used to deactivate plugins (I personally think it’s not such a good idea to deactivate plugins via the Panel as it might easily break your site, but obviously, other people think differently about this).
I personally think it’s not such a good idea to deactivate plugins via the Panel as it might easily break your site, but obviously, other people think differently about this
I can comprehend this but I have some Plugins like SASS which I need only on my development environment. And if you restrict a function like this to an admin it should be okay, as I think.
Yes, this makes sense. But if you use field plugins or anything that is used in your templates or controllers, the Panel or your site will break if you don’t remove the fields/code from your blueprints/templates/controllers/plugins…