Problem/Motivation

Test Subtheme in system tests is declared wrong, the test_subtheme.settings type is "theme_settings" but should be "test_basetheme.settings" inheriting its parent.

Proposed resolution

in core/modules/system/tests/themes/test_subtheme/config/schema/test_subtheme.schema.yml change to

test_subtheme.settings:
  type: test_basetheme.settings
  label: 'Test sub theme settings'

Notice the missing mapping, no need to redeclare it.

CommentFileSizeAuthor
#4 3332591-1.patch562 bytesprabuela

Issue fork drupal-3332591

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

Andras_Szilagyi created an issue. See original summary.

andras_szilagyi’s picture

It seems to me that at some point this was under a test, which I can't find a trace of right now, but if we where to execute this we would get a schema error in a phpunit test the way it is set up right now.

prabuela’s picture

Assigned: Unassigned » prabuela
prabuela’s picture

StatusFileSize
new562 bytes

The code has been changed as per the proposed sollution.

prabuela’s picture

Assigned: prabuela » Unassigned
Status: Active » Needs review
andras_szilagyi’s picture

Status: Needs review » Needs work

Thank you @PrabuEla but pay more attention, first, as I mentioned the mapping is also useless, second there is a MR open

andras_szilagyi’s picture

Status: Needs work » Needs review

I've added the code changes myself in the MR to avoid further missunderstanding, ready for review

prabuela’s picture

Sorry @Andras_Szilagyi It was my mistake.

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

smustgrave’s picture

Removing credit from myself as all I did was rebase.

#7 appeared to have gotten by the composer bug from a few weeks ago.

smustgrave’s picture

Status: Needs review » Postponed (maintainer needs more info)
Issue tags: +Needs Review Queue Initiative

So looking at the change can I ask where you got the issue from?

type: theme_settings I see this appears a few times in test modules.

Is there any documentation that states this type needs to match the module?

andras_szilagyi’s picture

Hi @smustgrave, it's been a while but I remember trying to use the test_theme as a parent theme in one test in a custom theme, it threw schema errors. I also created a documentation issue that is related to this https://www.drupal.org/project/documentation/issues/3332588

Version: 9.5.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. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

smustgrave’s picture

So claro and olivero have type: theme_settings also so wonder if it's a non issue?

smustgrave’s picture

Status: Postponed (maintainer needs more info) » Closed (works as designed)

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

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

Maintainers, please credit people who helped resolve this issue.