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.
| Comment | File | Size | Author |
|---|
Issue fork drupal-3332591
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:
- 3332591-wrong-schema-in
changes, plain diff MR !3224
Comments
Comment #2
andras_szilagyi commentedIt 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.
Comment #3
prabuela commentedComment #4
prabuela commentedThe code has been changed as per the proposed sollution.
Comment #5
prabuela commentedComment #6
andras_szilagyi commentedThank you @PrabuEla but pay more attention, first, as I mentioned the mapping is also useless, second there is a MR open
Comment #8
andras_szilagyi commentedI've added the code changes myself in the MR to avoid further missunderstanding, ready for review
Comment #9
prabuela commentedSorry @Andras_Szilagyi It was my mistake.
Comment #11
smustgrave commentedRemoving credit from myself as all I did was rebase.
#7 appeared to have gotten by the composer bug from a few weeks ago.
Comment #12
smustgrave commentedSo 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?
Comment #13
andras_szilagyi commentedHi @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
Comment #15
smustgrave commentedSo claro and olivero have type: theme_settings also so wonder if it's a non issue?
Comment #16
smustgrave commented