Closed Toutouwai closed 1 year ago
@Toutouwai The majority of users will never even know the option is there if we just suppress showing these actions. I think the current behavior is the right approach to ensure the options are known to the 90% of users that don't already know about the $config->moduleInstall
setting. The purpose here is to ensure the user knows this option is built-in and also instruct them on how to enable it, and specifically at the time they want it (should they want it). What I think might be an improvement here though is for the error message to also have a “How to upgrade module manually” link with additional instructions, as maybe a beginner user might not realize the moduleInstall
settings aren't required to upgrade the module.
The majority of users will never even know the option is there if we just suppress showing these actions.
I don't want to hide those options from the user, I just want to be alerted that a $config setting is disallowing the options from being used as early in the procedure as possible. I don't want to go through the steps of...
...only to see an error message and not to achieve my objective of installing the module.
Instead I want to be alerted right at the start that a $config setting needs to be updated if I am to successfully download and install modules. My suggestion is that the "Get Module Info" button is disabled and an adjacent note is added about the $config setting. And a similar thing for when attempting to update an installed module.
I agree with Robins comment above
@Toutouwai I'm not sure when it was added but I think we already have what you describe above. At least I just tried and this is what I get when all the moduleInstall options are disabled:
A similar message appears after clicking the 'check for updates' link on any module.
@ryancramerdesign, I took another look at this and the problem occurs when the directory
option for $config->moduleInstall
is true but not the download
option.
When $config->moduleInstall
features were introduced, the defaults were like this:
In more recent versions the directory
option also defaults to debug
, but the original settings can occur when this is in /site/config.php:
$config->moduleInstall('directory', true);
Now if $config->debug
is false the user is presented with the "Add Module From Directory" field, as if this method of module installation will work.
And you can get to the next screen...
...but then if you click Download Now you get this:
So it's like the directory
option can't actually work unless the download
option is also true?
Thanks @Toutouwai I see what you mean, I've pushed a fix for that.
Thanks
Short description of the issue
After updating a site to a more recent PW version I go to install a module from the modules directory...
...or I attempt to upgrade an existing module...
...and after clicking the download button I get this...
I understand why the message appears and what the solution is, but it's a bit aggravating to have the core show you download features that it "knows" you're not going to be able to use. When module installation is disallowed due the current
$config
settings the user should not see non-usable controls such as "Add Module From Directory" or "Download Now" buttons and ideally in their place should see some notice informing them that module download is not allowed.Setup/Environment