Make error messages more detailed (plugins)

I’m using Docker to run this service. The setup is real easy, and I thank you all for that.
However, I’m now a fair bit stuck in troubleshooting hell to figure our why I can’t enable the plugin installer.
I’ll figure it out eventually, but I’ll have to spend precious time on this, just because the error/status message is only generically stating “Your Kanboard instance is not configured to install plugins from the user interface” and not giving me any hint of what’s missing.

Please, include information in these messages that make it clear why and/or what is missing.

You have to enable it in your config.php

Set to true.

Thanks for the tip.
I figured this out on my own in the end, and managed to fix it, but the original request still remains; providing information in the actual message would make this that much easier to troubleshoot and, I will wager a guess, generate less Q&A about this specific configuration.

“not configured” would immediately take me to the config.php

configured => config.php:wink:

You could change it, and make a PR though…

I agree with OP because this $is_configured isn’t just about having setted PLUGIN_INSTALLER to true.
$is_configured is setted with Installer::isConfigured() (PluginController.php#L43-L48) and depends on three conditions:

On my first days with kanboard, I had to check the source code to find out why it wasnt getting enabled, and it was because I didnt have the zip extension enabled :sweat_smile:

However, it is documented: https://docs.kanboard.org/en/latest/admin_guide/plugins.html

The whole idea with this request, as I believe rafaelcamargo would agree with as well, is to get a status message that reports the state of all the necessary criteria.

“Your Kanboard instance is not configured to install plugins from the user interface.”

becomes something along the lines of

"
Your Kanboard instance does not meet the requirements for installing plugins from this user interface.
Your instance’s current state:

  • define(‘PLUGIN_INSTALLER’) value: [actual value from instance]
  • extension_loaded(‘zip’) value: [actual value from instance]
  • is_writable(PLUGINS_DIR) value: [actual value from instance]
    "

This way people would get to know the terminology, what requirements are needed and their current states, up front.

So…make it 3 returns, and make 3 messages. Then PR.

Of course, I say that without looking for anything else calling that function. …so, It could be that simple…it could also not be…

If it is, keep the return as is, an add 3 conditions to send the info to the configModel, then use the configModel setting to determine the message