Modules: enable, disable and what to do about dependencies
The three states of a module, how disabling differs from deleting, the required core and modules that need other modules.
A module gives the site a capability: a forum, a shop, news, downloads, an events listing. Modules are managed in the “Modules” section.
Three states
- the module sits in a folder: the engine sees it but does nothing;
- installed, disabled: the tables are in place and the data is intact, but the module does not work and is not on the site;
- enabled: working.
Disabling erases nothing: enable it again and everything is where it was. Only deleting erases, and the panel asks you to type the module name. That is why it is better to disable what you do not need than to delete it.
The required core
“Custom sections” and “Pages” are marked as the core of the site. They install themselves, and they cannot be disabled or deleted: other modules and the site itself rely on them. The panel explains this in plain words.
If a module needs other modules
Some modules rely on others. For example, “Cinema” works on top of “Custom sections”. When you enable such a module, the panel first shows what it needs and says for each item what will be done: install, enable, update or download. You confirm with one press of “Install together” and everything is done in order: the needed ones first, then the module itself. If something fails, the list stays on screen and nothing is half-installed.
The command php nex1on module:install name --with-deps does the same. Without --with-deps it only shows what is needed.
Where modules come from
The regular package includes only the core and a few modules the site cannot open without. The rest are downloaded from our server: the setup wizard offers it, and later you can take modules from the “Add-on catalogue”. Downloading needs the update permission and a fresh password. If the server is unreachable, the wizard offers “Continue with what is there”: the site is set up without the missing modules, and you can add them later. An archive with your own module is installed separately (see “Installing a module or theme from an archive”).
Before deleting
A module with data is better disabled first, with a database copy made (the “Database backups” section): deleting erases the module’s tables together with the entries.