The page at admin/reports/enabled_modules/disabled claims to only show modules if they have previously been enabled but now disabled.

In fact, it shows all modules that are not enabled, whether or not they have ever been so.

This is because the status field alone cannot determine if module has previously been enabled. For this, the schema field has to be checked as well. Modules that have NEVER been enabled have a schema version of '-1'.

This is how core does it:

$disabled_modules = db_query("SELECT name, filename, info FROM {system} WHERE type = 'module' AND status = 0 AND schema_version > %d ORDER BY name", SCHEMA_UNINSTALLED);

Patch to follow.

Comments

mlncn’s picture

Cool! I take it that a fully uninstalled module will look identical to a never-installed modules, not sure that needs to be clarified.

juliangb’s picture

Exactly.

juliangb’s picture

Rather than messing with the SQL as simple as that may be, I'll do this as part of #764350: Existing pages to be rewritten using views.

juliangb’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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