Hidden modules are visible in the "depends on: list

Created on 4 March 2020, over 5 years ago
Updated 20 June 2025, about 1 month ago

Problem/Motivation

Discovered in #474684: Allow themes to declare dependencies on modules β†’

ModulesListForm includes this conditional as part of displaying a module's dependencies:

// Only display visible modules.
elseif (empty($modules[$dependency]->hidden)) {
        // what should happen if the dependency is not hidden...
      }

This doesn't work, because $modules[$dependency]->hidden will always be empty. The value being looked for is in $modules[$dependency]->info['hidden'].
The result is if a module depends on hidden modules, those hidden modules are listed in that module's "depends on".

A simple way to reproduce this is go to a module's info.yml and add a dependency to a hidden test module. It'll show up.

Proposed resolution

Needs to be figured out. This is clearly not the intended behavior, but it's also been present since 8.0 (added in #1990544: Convert system_modules() to a Controller β†’ ) and nobody has noticed. There's a possibility that there are users that expect hidden modules to be listed as dependencies because it's been that way since 8 was released.

Remaining tasks

Depends on if we determine this is broken and needs to be fixed, or if this has mutated into expected functionality since it's never been anything different.

There will likely be @todo items pointing to this issue, so those will need addressing regardless of the solution that is implemented.

User interface changes

API changes

Data model changes

Release notes snippet

πŸ› Bug report
Status

Postponed: needs info

Version

11.0 πŸ”₯

Component

extension system

Created by

πŸ‡ΊπŸ‡ΈUnited States bnjmnm Ann Arbor, MI

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024