Change record status: 
Project: 
Introduced in branch: 
8.0.x
Description: 

You can no longer provide default theme settings in the theme's THEME.info.yml file. Defaults should be provided in the theme's THEME.settings.yml configuration file.

Before

Drupal 7 — THEME.info

settings[toggle_logo] = 1
settings[toggle_name] = 1
settings[toggle_slogan] = 1
settings[toggle_node_user_picture] = 1
settings[toggle_comment_user_picture] = 1
settings[toggle_comment_user_verification] = 1
settings[toggle_favicon] = 1
settings[toggle_main_menu] = 1
settings[toggle_secondary_menu] = 1
settings[zen_breadcrumb] = yes
settings[zen_breadcrumb_separator] = ' › '
settings[zen_breadcrumb_home] = 1

Drupal 8 — THEME.info.yml

settings:
  features:
    comment_user_picture: true
    comment_user_verification: true
    favicon: true
    logo: true
    name: true
    node_user_picture: true
    slogan: true
  zen_breadcrumb: yes
  zen_breadcrumb_separator: ' › '
  zen_breadcrumb_home: 1

After

The theme's config/install/THEME.settings.yml file should have the following information:

features:
  comment_user_picture: true
  comment_user_verification: true
  favicon: true
  logo: true
  name: true
  node_user_picture: true
  slogan: true
zen_breadcrumb: yes
zen_breadcrumb_separator: ' › '
zen_breadcrumb_home: 1
Impacts: 
Themers
Updates Done (doc team, etc.)
Online documentation: 
Not done
Theming guide: 
Not done
Module developer documentation: 
Not done
Examples project: 
Not done
Coder Review: 
Not done
Coder Upgrade: 
Not done
Other: 
Other updates done

Comments

Danny Englander’s picture

Just adding to this, if you want to generate one of these files for your theme automatically to place in your theme's config/install/ folder, simply export the current config and then copy the newly exported THEME.settings.yml into the folder. I just tested this and it works great.

bryanbraun’s picture

How does this affect custom theme settings? They used to look like this...

Before:

Drupal 7THEME.info

settings[my_custom_setting1] = 'stringvalue'
settings[my_custom_setting2] = '1'

Drupal 8 THEME.info.yml

settings:
  my_custom_setting1: 'stringvalue'
  my_custom_setting2: '1'

: Bryan

bryanbraun’s picture

After some trial and error, I discovered that you can set custom settings in the new config/install/THEME.settings.yml file... just not inside the features group.

After:

Drupal 8config/install/THEME.settings.yml

features:
  logo: true
my_custom_setting1: 'stringvalue'
my_custom_setting2: '1'

Remember you need to uninstall and reinstall to see it take effect.

: Bryan

CIsSharp’s picture

Do you know what does above work in omega theme? I just downloaded omega theme and there are lot of files under config/install.
I have know idea how these files work and how to create newer one. Please let me know if you have any information on this.

Thanks,

Some of the world's greatest feats were accomplished by people not smart enough to know they were impossible...- Doug Larson

esteinborn’s picture

The way the D8 saves all of your block configuration to the theme, when you uninstall a theme and reinstall it, you lose all block configuration in the process.

Is there any way to update the theme to see the new settings rather other than uninstalling and reinstalling?

xenophyle’s picture

I was able to get around this by setting another theme as the default (without uninstalling the theme you want) and then putting my theme back as the default.

In general, it might also work to export configuration and then import it after reenabling the uninstalled theme or module, but i haven't tested iths