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.

Issue fork bootstrap-2883714

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

Grimreaper created an issue. See original summary.

grimreaper’s picture

Assigned: grimreaper » Unassigned
Status: Active » Needs review
StatusFileSize
new6.37 KB

Here is the patch.

Thanks for the review.

markhalliwell’s picture

Title: Update config schema » Properly use config schema for theme settings
Status: Needs review » Postponed (maintainer needs more info)

First, 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.

markhalliwell’s picture

Status: Postponed (maintainer needs more info) » Needs work

Not 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.:

button_colorize:
button_iconize:
button_size:

---

button:
  colorize:
  iconize:
  size:
grimreaper’s picture

Hello,

OK. Ping me if I can do something to help.

grimreaper’s picture

Hello,

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.

rosk0’s picture

dixon_’s picture

StatusFileSize
new4.92 KB

Re-rolled the patch

markhalliwell’s picture

Version: 8.x-3.x-dev » 8.x-4.x-dev

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

piggito’s picture

StatusFileSize
new5.36 KB
new987 bytes

I added some settings missing to the patch in #8

piggito’s picture

StatusFileSize
new5.43 KB
new486 bytes

Missed cdn_custom setting on my last patch so here is a new one.

lawxen’s picture

Drupal\Core\Config\Schema\SchemaIncompleteException: Schema errors for bs.settings with the following errors: bs.settings:reset_http_request_cache missing schema

lawxen’s picture

StatusFileSize
new5.52 KB
new276 bytes

Add reset_http_request_cache

markhalliwell’s picture

Can we please go ahead and convert this to dot notation as I suggested in #4?

lawxen’s picture

Can we please go ahead and convert this to dot notation as I suggested in #4?

@markcarver Great suggestion, thanks for the guidance, haha.

And I am facing errors because the test system checks for the config schema of the config imported...

@Grimreaper You can add one line code to ignore the schema check in phpunit test.
protected $strictConfigSchema = FALSE;

grimreaper’s picture

@kaysenlau: Thanks for the tip :)

geek-merlin’s picture

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

blanca.esqueda’s picture

@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

lamp5’s picture

Version: 8.x-4.x-dev » 8.x-3.x-dev
Status: Needs work » Needs review
StatusFileSize
new1.02 KB

Added patch to recent 8.x-3.x

2dareis2do’s picture

Does this issue explain why I get notices like this?

logo.url	URL	uri	Yes			This value should be of the correct primitive type.	
logo.use_default	Use default	boolean	Yes	TRUE			
schemas	Undefined	undefined	No	<array>	missing schema	schemas' is not a supported key.	
table_responsive	Undefined	undefined	No	-1	missing schema	table_responsive' is not a supported key.	
cdn_provider	Undefined	undefined	No		missing schema	cdn_provider' is not a supported key.	
cdn_theme	Undefined	undefined	No		missing schema	cdn_theme' is not a supported key.	
cdn_cache_ttl_versions	Undefined	undefined	No	0	missing schema	cdn_cache_ttl_versions' is not a supported key.	
cdn_cache_ttl_themes	Undefined	undefined	No	0	missing schema	cdn_cache_ttl_themes' is not a supported key.	
cdn_cache_ttl_assets	Undefined	undefined	No	0	missing schema	cdn_cache_ttl_assets' is not a supported key.	
cdn_cache_ttl_library	Undefined	undefined	No	0	missing schema	cdn_cache_ttl_library' is not a supported key.	
reset	Undefined	undefined	No	Reset Broken Cache	missing schema	reset' is not a supported key.	
apply	Undefined	undefined	No	Apply	missing schema	apply' is not a supported key.	
reset_http_request_cache	Undefined	undefined	No		missing schema	reset_http_request_cache' is not a supported key.	
table	Undefined	undefined	No		missing schema	table' is not a supported key.	
hatuhay’s picture

Status: Needs review » Closed (won't fix)
xmacinfo’s picture

Status: Closed (won't fix) » Needs review

@hatuhay When closing an issue with Won’t fix, please provide information. A simple switch to Close is not enough.

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

herved’s picture

StatusFileSize
new3.58 KB
new3.32 KB

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

hatuhay’s picture

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

herved’s picture

StatusFileSize
new7.99 KB
new2.56 KB

#20 discarded most settings from the previous patch #13, what happened there?
Updated MR and patch, according to patch #13 instead.

herved’s picture

StatusFileSize
new8.48 KB

Some more fixes... I think it should be ok now.

herved’s picture

StatusFileSize
new9.8 KB

We 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, reset configs