getgrav / grav-learn

Grav Learn (exhaustive grav documentation)
http://learn.getgrav.org
MIT License
228 stars 785 forks source link

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

Open drzraf opened 2 years ago

drzraf commented 2 years ago

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.

mahagr commented 2 years ago

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.

drzraf commented 2 years ago

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.

mahagr commented 2 years ago

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

drzraf commented 2 years ago

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