Problem/Motivation

Currently the logic that checks the passed config values only evaluates and will fall back to the default_region if there is an array set in the region key. If a recipe author wants every theme to use a common region (for example, to use the "content" region everywhere) they still have to explicitly set at least one value in the region key.

Proposed resolution

Allow region to be a string, and if it is, use it as-is.

Issue fork drupal-3462896

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

mandclu created an issue. See original summary.

phenaproxima’s picture

I propose a slightly different variant: let's just allow the region to be a string, instead of an array, if it's meant to be the same region regardless of theme. If it's a string, it's passed through to the EntityCreate plugin unaltered.

phenaproxima’s picture

Issue summary: View changes

phenaproxima’s picture

Status: Active » Needs review
mandclu’s picture

Status: Needs review » Reviewed & tested by the community

OK, this works to use a string unmodified if that has been set for the region.

quietone’s picture

Title: Allow 'region' key to be omitted for placeBlockInDefaultTheme and placeBlockInAdminTheme config actions » Allow 'region' key to be a string for placeBlockInDefaultTheme and placeBlockInAdminTheme config actions

Just a title update

  • nod_ committed 5acde36f on 11.x
    Issue #3462896 by phenaproxima, mandclu: Allow 'region' key to be a...
nod_’s picture

Status: Reviewed & tested by the community » Fixed

Committed 5acde36 and pushed to 11.x. Thanks!

Status: Fixed » Closed (fixed)

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

liam morland’s picture

The way it is now, if the region key is not set, there will not be an error message. There is a fix for this in #3581232: Doesn't fall back to default_region if no region is set in placeBlockInDefaultTheme.