- Issue created by @jonnyhocks
- Merge request !12587Issue #3533588: Adjust createPlaceholder to return false β (Open) created by jonnyhocks
- π¬π§United Kingdom jonnyhocks
I've opened a merge request just reverting the update to return false now until a solution is put forward.
- π³πΏNew Zealand quietone
If this problem was discovered on a version of Drupal that is not 11.x, add that information in the issue summary and leave the version at 11.x. In Drupal core changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies β . Also mentioned on the version β section of the list of issue fields documentation. Thanks.
- π¨π¦Canada kiwad
I have this code in twig :
{% set aside_start_top_rendered = page.aside_start_top|render %}
{% set aside_start_bottom_rendered = page.aside_start_bottom|render %}{% set aside_exists = (aside_start_top_rendered is real_content or aside_start_bottom_rendered is real_content) and not narrow and container_type != 'fluid' %}
After updating from 11.1.18 to 11.2.2, aside_exists now always returns TRUE because of placeholders
Before 11.2.2, my block had this in it :
{"cfa_navigationprincipale":{"#cache":{"keys":["entity_view","block","cfa_navigationprincipale"],"contexts":["languages:language_interface","route.menu_active_trails:main"],"tags":["block_view","config:block.block.cfa_navigationprincipale","config:system.menu.main"],"max-age":-1},"#weight":0,"#lazy_builder":["Drupal\\block\\BlockViewBuilder::lazyBuilder",["cfa_navigationprincipale","full",null]]},"#sorted":true,"#theme_wrappers":["region"],"#region":"aside_start_top"}
After 11.2.2
{"cfa_navigationprincipale":{"#cache":{"keys":["entity_view","block","cfa_navigationprincipale"],"contexts":["languages:language_interface","route.menu_active_trails:main"],"tags":["block_view","config:block.block.cfa_navigationprincipale","config:system.menu.main"],"max-age":-1},"#weight":0,"#lazy_builder":["Drupal\\block\\BlockViewBuilder::lazyBuilder",["cfa_navigationprincipale","full",null]],"#create_placeholder":true},"#sorted":true,"#theme_wrappers":["region"],"#region":"aside_start_top"}
As a workaround for now, I did in custom module :
function mymodule_preprocess_page(array &$variables) { if (isset($variables['page']['aside_start_top']['cfa_navigationprincipale'])) { $variables['page']['aside_start_top']['cfa_navigationprincipale']['#create_placeholder'] = FALSE; } if (isset($variables['page']['aside_start_bottom']['cfa_navigationprincipale'])) { $variables['page']['aside_start_bottom']['cfa_navigationprincipale']['#create_placeholder'] = FALSE; } }
- π΅π°Pakistan hamza_niazi
I was facing the same issue but for merge 12587 works fine
- πΊπΈUnited States pmagunia Philadelphia πΊπΈ
There are also other files this temporary fix needs to be applied to. For example:
core/modules/system/src/Plugin/Block/SystemMenuBlock.php