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
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:
- 3462896-allow-region-key
changes, plain diff MR !8897
Comments
Comment #2
phenaproximaI propose a slightly different variant: let's just allow the
regionto 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.Comment #3
phenaproximaComment #5
phenaproximaComment #6
mandclu commentedOK, this works to use a string unmodified if that has been set for the region.
Comment #7
quietone commentedJust a title update
Comment #10
nod_Committed 5acde36 and pushed to 11.x. Thanks!
Comment #12
liam morlandThe way it is now, if the
regionkey 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.