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

  1. Set default_admin as the admin theme.
  2. Visit any node edit form in a test run with deprecation reporting on.
  3. The deprecation is triggered.

Proposed resolution

  • Delete the node/form block from the theme's libraries-override.
  • Also delete the node/drupal.node library override. Overrides of this library were removed from the other Core themes at the same time that node/form was deleted.

User interface changes

None.

API changes

None.

Data model changes

None.

Issue fork drupal-3618601

Command icon 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

f0ns created an issue. See original summary.

f0ns’s picture

MR pushed. The adjacent node/drupal.node override already suppresses the same css/node.module.css, so no styling changes.

f0ns’s picture

Status: Active » Needs review
f0ns’s picture

The 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.

dcam’s picture

Status: Needs review » Needs work

The 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.

f0ns’s picture

Yes you are right! I've accepted your suggestion.

f0ns’s picture

Status: Needs work » Needs review
dcam’s picture

Priority: Normal » Major
Status: Needs review » Reviewed & tested by the community

Looks 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.

dcam’s picture

Issue summary: View changes

  • catch committed 95ebc2c8 on 11.x
    fix: #3618601 default_admin overrides the deprecated node/form asset...

  • catch committed 26106a2b on main
    fix: #3618601 default_admin overrides the deprecated node/form asset...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to main and 11.x, thanks!

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.