Problem/Motivation
node/form was deprecated in drupal:11.4.0 and is removed in drupal:12.0.0 (change record), but default_admin.info.yml still carries a libraries-override for it:
node/form: css: layout: css/node.module.css: false
Loading any node form with default_admin as the admin theme triggers "Theme "default_admin" is overriding a deprecated library", which fails test runs. default_admin is the only core theme overriding it; Claro has no such entry. It looks like a leftover from the Gin port.
Nothing caught this because the theme's only functional test visits /admin/content, never a node form. It surfaced in the PHPUnit run on #3618586, whose new test is the first in core to load a node edit form under this theme.
Steps to reproduce
- Set
default_adminas the admin theme. - Visit any node edit form in a test run with deprecation reporting on.
- The deprecation is triggered.
Proposed resolution
- Delete the
node/formblock from the theme'slibraries-override. - Also delete the
node/drupal.nodelibrary override. Overrides of this library were removed from the other Core themes at the same time thatnode/formwas deleted.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork drupal-3618601
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:
- 3618601-defaultadmin-overrides-the
changes, plain diff MR !16810
Comments
Comment #3
f0ns commentedMR pushed. The adjacent
node/drupal.nodeoverride already suppresses the samecss/node.module.css, so no styling changes.Comment #4
f0ns commentedComment #5
f0ns commentedThe two red jobs are the PHP 8.6 forward-compat runs (IconFinderTest and XssTest deprecations), unrelated to this change. All jobs on supported PHP pass.
Comment #6
dcam commentedThe issue is pretty cut-and-dry, but I went ahead and replicated the report using the steps to reproduce it and the test-in-development from #3618586: default_admin loses the footer group on forms that set #tree, silently unpublishing entities on save.
Applying the MR removes the offending library override, which stops the deprecation notice when running the test.
The change mirrors other library override removals that we made when the library was first deprecated in #2335523: Remove node.module.css from node/drupal.node library and deprecate node/form library. As a result, I think this is one bug report that does not need tests. This override removal would have been made without tests if default_admin had been committed to Core before the deprecation happened.
This is looking good, but we need an additional library removal that I left a suggestion for in my MR comment.
Comment #7
f0ns commentedYes you are right! I've accepted your suggestion.
Comment #8
f0ns commentedComment #9
dcam commentedLooks good to me. Thank you for making the additional change.
Committers: the change should be backported to 11.x. The other override removals were backported too. I expect the change will cherry-pick cleanly, so I doubt this will need an 11.x MR.
I'm increasing the priority to Major because this is blocking another issue which won't pass tests until this is committed.
Comment #10
dcam commentedComment #13
catchCommitted/pushed to main and 11.x, thanks!