Problem/Motivation
Themes can depend on modules as of Drupal 8.9.0 (https://www.drupal.org/node/2937955). However when an experimental theme depends on a module, it results in PHP warnings and a confusing screen when confirming.
The bug is in ThemeExperimentalConfirmForm.php lines 104–130. The code collects all entries from $all_themes[$theme]->requires as the dependency list — but requires contains both theme and module dependencies. It then passes every entry to $get_label(), which does $all_themes[$dep]->info['name']. Module names are not present in $all_themes (the themes list), so the array key is undefined which results in a PHP warning and an empty list item.
Steps to reproduce
1. Add these two lines to default_admin.info.yml in core
dependencies:
- drupal:views
- drupal:claro
2. Try to install the theme.
3. Get this screen:

Proposed resolution
List modules and themes separate like ModulesListConfirmForm does. Kept the same wording which is also used in ModulesListConfirmForm although I think this is confusing because the human does not need to go back and do the installation for those things (which it sounds like to me) but the machine will do it for them in this form.

Remaining tasks
Should we also list experimental modules as a separate list from the dependencies?
User interface changes
Introduced terminology
API changes
Data model changes
Release notes snippet
LLM disclosure
The bug was found while writing tests for a contributed module with an LLM. While the bug was identified manually, the fix was LLM assisted too.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | Screenshot 2026-07-20 at 10.47.42.png | 203.06 KB | gábor hojtsy |
| #3 | Screenshot 2026-07-20 at 10.50.48.png | 448.93 KB | gábor hojtsy |
| #2 | Screenshot 2026-07-20 at 10.35.29.png | 184.53 KB | gábor hojtsy |
| Screenshot 2026-07-20 at 10.18.43.png | 464.72 KB | gábor hojtsy |
Issue fork drupal-3611966
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
gábor hojtsyComment #3
gábor hojtsyDecided to add a list of module dependencies like ModulesListConfirmForm does :)
Comment #4
gábor hojtsyComment #5
gábor hojtsyComment #7
smustgrave commentedNeat! Left some small comments.