Hi,

Context : a new D8 instance 8.2.5 with module_filter enabled, Pathauto who requires Token (but Token is disabled).

I search 'Path' in the search input then check Pathauto and click install.
Then I'm not redirected to the ConfirmFom who normally ask to confirm the installation of dependencies modules, instead the system module form reload and neither Pathauto or it's dependence are installed.

The redirect from the submitForm() from modules/system/src/Form/ModulesListForm is overridden in the submit callback module_filter_system_modules_redirect_submit.
The redirect from the submitForm() is call when there are dependencies to the module we want to enable in order to redirect to the system.modules_list_confirm.

Maybe a tempstore (user.private_tempstore) should be used instead but it implies to delete the value at some point as the search form element is used on module list, uninstall and perm form.

Anyway imo the redirect in module_filter_system_modules_redirect_submit should be removed atm, to be able to enable module with dependencies is prior to the filters input default value.

Comments

romsP created an issue. See original summary.

romsP’s picture

Title: Module not enabled when reaquired module is disabled. » Module not enabled when required module is disabled.
greenskin’s picture

Title: Module not enabled when required module is disabled. » Module not enabled when required module is disabled
Status: Active » Needs review
StatusFileSize
new1.44 KB

Here's a fix that allows the filter value to persist through the confirm submission process.

greenskin’s picture

Status: Needs review » Reviewed & tested by the community

Moving this along.

joelpittet’s picture

You can't disable a module in D8, do you mean uninstalled?

  • greenSkin committed c0691ea on 8.x-3.x
    Issue #2843318 by greenSkin: Module not enabled when required module is...
greenskin’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.