Problem/Motivation

The config entity is not always complete, i.e. if a new role gets created and a config script e.g. sets something like drush -y config:set role_theme_switcher.settings roles.newrole.theme gin, then the admin_theme key is missing in that case. That creates warnings on screen and in the log.

Proposed resolution

Use a default, if a value is not defined.

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

jurgenhaas created an issue. See original summary.

jurgenhaas’s picture

Status: Active » Needs review

daletrexel’s picture

Status: Needs review » Reviewed & tested by the community

We've had this patch running in production on D10 for a number of months now successfully. Looks like it doesn't need any updates for D11. Changes are pretty straight forward. Marking as RBTC.

neslee canil pinto made their first commit to this issue’s fork.

  • jurgenhaas committed dbf6f353 on 8.x-1.x
    Issue #3414975: Handle unset keys in \Drupal\role_theme_switcher\Theme\...
neslee canil pinto’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.