Problem/Motivation

Unless you're using the Standard profile, the default value of the Use the administration theme when editing or creating content option on the Appearance page is false, which means that node forms are rendered using the frontend theme. I feel like since the progress in the Admin UI and JavaScript Modernisation Initiative, the Claro theme set as default admin theme and the rise in popularity of Gin theme this is no longer a sensible default. Maybe I'm biased since I have never had to integrate admin forms with custom frontend themes, but is this still a thing nowadays?

Steps to reproduce

Set up a fresh Drupal installation with the Minimal install profile and visit the Appearance admin page. The option is turned off.

Proposed resolution

Turn on the Use the administration theme when editing or creating content by default for new installations.

Remaining tasks

Do it.

User interface changes

Node forms will be rendered in the admin theme by default.

Issue fork drupal-3347015

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

DieterHolvoet created an issue. See original summary.

dieterholvoet’s picture

Status: Active » Needs review
cilefen’s picture

Version: 10.0.x-dev » 10.1.x-dev
smustgrave’s picture

Tagging for framework manager for their thoughts.

Personally I would not like to see this happen as I think this goes against the work done for claro.

dieterholvoet’s picture

Personally I would not like to see this happen as I think this goes against the work done for claro.

How so? Changing this would make it so Claro is used in even more situations, right?

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Having a terrible case of the Mondays and no coffee. You are correct, some reason I read it as using the front end theme by default.

That's my mistake. Will mark it and see what the committer says.

gábor hojtsy’s picture

I think Drupal may have been a system where using the frontend theme was the sensible default, but its used for more ambitious projects now and using the admin theme by default fits with that better. (Content types are more complex and usually other admin tasks are involved in creating the content, such as category management or media management).

lauriii’s picture

Status: Reviewed & tested by the community » Needs review
Issue tags: -Needs framework manager review

I don't think this actually needs a framework manager review so removing the tag.

Something we still need to do is to go through tests where $this->config('node.settings')->set('use_admin_theme', '1') is being called to make sure that we are not changing any tests to not test what they are supposed to test.

alexpott’s picture

Issue tags: +Needs change record

Yeah it'd be good to know if we have explicit test coverage around this setting. Plus we'll need a CR to announce the change to people.

+1 for the change.

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative

Searching for

->config('node.settings')->set('use_admin_theme',

There are 4 instances and 3 I believe can be removed.

ConfigurableLanguageManagerTest
AddedStylesheetsTest
ShortcutLinksTest

As far as a dedicated test where would that go?

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

acbramley made their first commit to this issue’s fork.

acbramley’s picture

Issue tags: -Needs change record

https://www.drupal.org/node/3514929 CR added

Rebased the MR against 11.x, will do a sniff round tests.

acbramley’s picture

Status: Needs work » Needs review

Resulted in a nice bit of tidy up.

The RecipeRunnerTest::testModuleConfigurationOverride test case specifically tested overriding this setting via a recipe so I've reversed the recipe's settings so the test is still testing that the recipe overrides node's default.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Failures appear to be random.

Believe feedback has been addressed.

  • catch committed 3b90a561 on 11.x
    Issue #3347015 by acbramley, dieterholvoet, smustgrave, gábor hojtsy,...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Makes sense to me, and only flipping a default. We've got +1s from two product managers on this issue but because it was a while ago I pinged and @Gabor confirmed his was still valid.

Committed/pushed to 11.x, thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.