Hello,
The theme settings added by Bootstrap are not in its config schema.
Also it is easier to declare sub theme settings as of type bootstrap.settings to herit from it.
I will provide a patch for that.
| Comment | File | Size | Author |
|---|---|---|---|
| #30 | fix_config_schema-2883714-30.diff | 9.8 KB | herved |
Issue fork bootstrap-2883714
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
Comment #2
grimreaperHere is the patch.
Thanks for the review.
Comment #3
markhalliwellFirst, I'd like to thank you very much for going through all that LOC. That must have been very tedious work.
So, a little back history:
Theme settings + schema is kind of a funny thing really. Initially, it was never fully flushed out and caused a lot of issues in the beginning.
This base theme basically hi-jacks core's processing of the theme settings from the database and manages it all via the @BootstrapSetting plugin system.
I'm not opposed to revamping this as I hope the schema stuff for themes is a little more solid in 8.4.0+.
I suspect, however, that whatever does end up happening here will likely need to be done in a major version change (soon-ish?) as not to break BC.
Comment #4
markhalliwellNot sure why I postponed this. Perhaps because, historically, config + themes have always been a pain point.
That being said, if we're going to revamp the theme settings to be centered around proper config, I'd like to also convert them into dot notation as well e.g.:
---
Comment #5
grimreaperHello,
OK. Ping me if I can do something to help.
Comment #6
grimreaperHello,
I am writing Functional PHPUnit tests on a project (I have never written tests on a full project, only on modules on Drupal.org) where the installation profile has a Bootstrap subtheme.
And I am facing errors because the test system checks for the config schema of the config imported...
When I have opened this issue and make the patch it was just to fix config schema, but now I realize it may be blocking tests on other people on projects.
It's ok for me, I have applied the patch. Just to highlight that it may block automated tests.
Comment #7
rosk0Comment #8
dixon_Re-rolled the patch
Comment #9
markhalliwellI don't think we should really be futzing with this in 8.x-3.x, let's move this to 8.x-4.x instead.
Also, we really should use dot notation instead of underscores (as I mentioned in #4).
This will allow us to nest the settings into their appropriate groups.
Comment #10
piggito commentedI added some settings missing to the patch in #8
Comment #11
piggito commentedMissed cdn_custom setting on my last patch so here is a new one.
Comment #12
lawxen commentedDrupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for bs.settings with the following errors: bs.settings:reset_http_request_cache missing schema
Comment #13
lawxen commentedAdd reset_http_request_cache
Comment #14
markhalliwellCan we please go ahead and convert this to dot notation as I suggested in #4?
Comment #15
lawxen commented@markcarver Great suggestion, thanks for the guidance, haha.
@Grimreaper You can add one line code to ignore the schema check in phpunit test.
protected $strictConfigSchema = FALSE;Comment #16
grimreaper@kaysenlau: Thanks for the tip :)
Comment #17
geek-merlinAccidentally looked into this. Just a note: Translatable config properties should be "label" type, not string. I noticed there are properties like "popover_title". If i got it wrong, simply ignore.
Comment #18
blanca.esqueda commented@geek.merlin aka axel.rutz
What about for translatable config values?
I'm not so sure if it is related, but I'm trying to figure out how to add configuration setting that can be translatable.
https://www.drupal.org/project/wxt/issues/3082394
Comment #19
markhalliwellJust for reference #3068483: Automatically map !translate YAML tag to TranslatableMarkup
Comment #20
lamp5Added patch to recent 8.x-3.x
Comment #21
2dareis2do commentedDoes this issue explain why I get notices like this?
Comment #22
hatuhay commentedComment #23
xmacinfo@hatuhay When closing an issue with Won’t fix, please provide information. A simple switch to Close is not enough.
Comment #26
herved commentedOpened MR, here is a static patch for composer if anyone needs it.
and the interdiff with #20.
PS: I know 3.x is now phasing out but I need those schema fixes, we are planning a BS5 migration.
Comment #27
hatuhay commented@xmacinfo
There were over 200 tickets on versions 8.x-3.x and 7.x sited for months or years.
Just did a cleanup for all over 6 months last interaction expexcting that if any of this tickets were still alive someone was going to pick it up, like in this case.
Just for the record, this is the only one at the moment alive again.
Comment #28
herved commented#20 discarded most settings from the previous patch #13, what happened there?
Updated MR and patch, according to patch #13 instead.
Comment #29
herved commentedSome more fixes... I think it should be ok now.
Comment #30
herved commentedWe need langcode now that some configs are translatable.
Note: there is no hook_update so, in bootstrap.settings and subtheme settings:
- add
langcode: en- if present, delete
reset_http_request_cache,table,apply,resetconfigs