grav-learn icon indicating copy to clipboard operation
grav-learn copied to clipboard

multisite-setup, setup.php `plugins` key does not allow disabling plugins

Open drzraf opened this issue 3 years ago • 4 comments

https://github.com/getgrav/grav-learn/blob/develop/pages/08.advanced/05.multisite-setup/docs.17.md indicates that user/setup.php could do something like:

return [
    'plugins' => []
];

I tried:

return [
    'plugins' => [
        'problems' => [
            'enabled' => 'false'
        ],
        'git-sync' => [
            'enabled' => 'false'
        ]
    ],

... in order to disable a set of plugins, without success.

Whether or not this is supported, this must be documented. Note: I couldn't find the necessary codebase references to dig for the underlying logic.

drzraf avatar Dec 09 '21 14:12 drzraf

Setup is not meant to do that. It just initializes the system so that everything loads from the right place -- including the configuration. Configuration files that get loaded later will override everything in the setup.

mahagr avatar Dec 10 '21 14:12 mahagr

Yeah, but it's documented it could already do that (= configure plugins):

Screenshot from 2021-12-13 11-29-41

So one would expect it could disable plugins too.

drzraf avatar Dec 13 '21 14:12 drzraf

No, even that won't work if you override the keys. Besides above example has been superseded with a better solution anyways.

mahagr avatar Dec 14 '21 17:12 mahagr

Could you please remove that misleading chunk from the documentation and put the better solution? I'm interested knowing what best practices are advised.

drzraf avatar Dec 14 '21 20:12 drzraf