Closed (fixed)
Project:
Drupal core
Version:
main
Component:
Admin theme
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
3 Oct 2026 at 21:44 UTC
Updated:
29 Oct 2026 at 08:10 UTC
Jump to comment: Most recent
FormHooks::formMediaLibraryAddFormAlter() (core/themes/default_admin/src/Hook/FormHooks.php:188) attaches default_admin/media_library.theme to the Media Library add form, but default_admin.libraries.yml defines no such library (it has media_library).
The name is left over from Claro, which defines claro/media_library.theme (claro.libraries.yml:299). Default Admin's Media Library CSS comes in through libraries-extend (default_admin/media_library) instead, so the attachment does nothing.
Remove the attachment.
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 #4
shank115 commentedComment #5
dcam commentedThe
default_adminlibraries related tomedia_librarywere reorganized by #3590364: Part 2 of Consolidate, refactor, remove and untangle Claro's CSS from Default Admin theme. That was when themedia_library.themelibrary was consolidated into the single, unified asset library.I checked to see if there are any other lingering references to the old asset library and didn't find any. I also grepped for the other consolidated library name,
media_library.ui, and didn't find any of those either. I think the attachment being deleted by the MR is the only remaining reference in Core.Obviously, the attachment currently does nothing since the library doesn't exist. But I verified the assertion in the issue summary that the CSS is added via a library extension:
The CSS files are attached to the form, indicating that the library extension is working as expected. Therefore, it's correct to delete the attachment in the form alter hook rather than repairing it.
Comment #6
catch@shank115 it looks like you used an LLM to generate the MR (going by the MR summary), which I'm a bit confused by because it would take less key presses to delete the line manually than prompt an LLM to do it. Please note Drupal's contribution policy which requires disclosure of LLM usage when contributing to Drupal https://www.drupal.org/docs/develop/issues/issue-procedures-and-etiquett...
Comment #9
catchCommitted/pushed to main and 12.0.x, thanks!