Reviewed & tested by the community
Project:
Drupal core
Version:
11.x-dev
Component:
system.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
30 Apr 2026 at 08:34 UTC
Updated:
1 May 2026 at 14:29 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
catchComment #4
catchRelatively small improvement but it's across almost all scenarios.
Comment #5
smustgrave commentedVery nice! I don't see anything wrong with this and have no additional feedback..
Comment #6
alexpottThis makes we wonder when a block should not be placeholdered? Here's the docs:
Maybe we should change the default implementation to TRUE and make FALSE the unusual case?
Comment #7
smustgrave commentedI’d be +1 to changing to default to True
Comment #8
needs-review-queue-bot commentedThe Needs Review Queue Bot tested this issue. It no longer applies to Drupal core. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide to find step-by-step guides for working with issues.
Comment #9
catchI think changing the default to true would be a good follow-up we might want to only do that in 12.x or similar.
Comment #10
catchRebased and opened #3588012: Default ::createPlaceholder() to true for blog plugins.
Comment #11
alexpottShouldn't we do #3588012: Default ::createPlaceholder() to true for block plugins in main and not do this given the disruption we've already caused re #3533588: Core blocks now use placeholders, making it impossible for the theme to determine if the region is empty?
Or should we fix #3533588: Core blocks now use placeholders, making it impossible for the theme to determine if the region is empty - like we could create the ability for themes to disable placeholdering on the region level. Default it to FALSE - which means trust the block. Then main on main we can do #3588012: Default ::createPlaceholder() to true for block plugins and themes would have a way to opt regions out already.
Comment #12
catchWell the site branding block at least is always going to be rendered, there's no conditional rendering there.
The messages block is always rendered with an HTML placeholder for JavaScript messages, even if that's not visible until a message is added, so from the point of view of the region, that's always rendered too.
The help block is conditionally rendered, but e.g. in Umami, the help and messages blocks are both in the 'highlighted' region, and because the messages block is always rendered, the highlighted region is never empty.
In Claro, which has separate help and messages blocks, this does result in an extra bit of empty HTML in the help region, but claro already has an empty help div in HEAD wrapping the region and afaict it doesn't result in any visual change.
We already made this change for views blocks several releases ago, which are far more likely to be conditionally rendered, and more often in sidebars etc. where the emptiness or not of a region is more likely to have an effect.
Attaching screenshots of the Claro change.
Comment #13
alexpottThanks @catch for #12 that's convinced me we should go ahead.
Comment #14
alexpottActually doesn't
mean this is more likely to cause issues. I.e. if a theme has a region that has the empty logic - this will break it.
Comment #15
catchThe site branding block will always have content in it, so the region it's in will never be empty and even if the theme is trying to remove empty regions that would never kick in. With or without this MR.
Comment #16
catchRebased.
Comment #18
alexpottCommitted e461ced and pushed to main. Thanks!
Comment #20
catch11.x backport MR is up - it's almost exactly the same just one or two numbers are different due to 12.x deprecations and removals.