Remove dead code from page.html.twig
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3594489. --> Reported by: [igorgoncalves](https://www.drupal.org/user/1279070) Related to !796 >>> <h3 id="summary-problem-motivation">Problem/Motivation</h3> <p>Inside the {% if active_core_navigation %} branch of page.html.twig, there is a dead code block that can never execute:</p> <pre>{% if active_core_navigation %}<br>&nbsp; ...<br>&nbsp;&nbsp;&nbsp; {% if not active_core_navigation %}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {{ page.content[local_actions_block] }}<br>&nbsp;&nbsp;&nbsp; {% endif %}<br>&nbsp; ...<br>{% endif %}</pre><p> The inner condition {% if not active_core_navigation %} is always false when reached, since it is nested inside {% if active_core_navigation %}. The local_actions_block output is therefore never rendered on this path.</p> <h3 id="summary-proposed-resolution">Proposed resolution</h3> <p>Remove the three unreachable lines from the {% if active_core_navigation %} branch:</p> <pre>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {{ page.header[page_title_block] }}<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {% if not active_core_navigation %}<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {{ page.content[local_actions_block] }}<br>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {% endif %}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {{ gin_form_actions }}</pre>
issue