- Issue created by @prudloff
- 🇫🇷France prudloff Lille
This might need to be fixed in core: 🐛 Block access is checked even if the block's region is never rendered Active
We noticed that some of ours block access function were executed even if the block is inside a group that is not displayed on the current page.
It seems to happen because groups are regions.
BlockPageVariant::build()
calls BlockRepository::getVisibleBlocksPerRegion()
and this method calls the access function of every block in each region.
protected function blockAccess(AccountInterface $account) {
return AccessResult::allowed()->setCacheMaxAge(0);
}
Active
2.0
Code
This might need to be fixed in core: 🐛 Block access is checked even if the block's region is never rendered Active