Missing contextual links with Drupal 10.3.2 and Radix 6

Created on 28 August 2024, 3 months ago
Updated 19 September 2024, 2 months ago

since upgrading to drupal 10.3.2, contextual menus are breaking in Radix installation

the ul.contextual-links list is not populated.

these contextual links work okay when Olivero is enabled as the theme.

Radix version dev-6.0.x 0b4c9f0

<div data-contextual-id="node:node=63011:changed=1719855170&amp;ds_bundle=article&amp;ds_view_mode=update_card&amp;langcode=en" data-contextual-token="GUUXSa0RrbeskLMyV1_OdoatN7aN51vt1MUTq34NKFY" data-drupal-ajax-container="" data-once="contextual-render" class="contextual"><button class="trigger focusable visually-hidden" type="button" aria-pressed="false" style="">Open {article title redacted} configuration options</button>

<!-- THEME DEBUG -->
<!-- THEME HOOK: 'links__contextual' -->
<!-- FILE NAME SUGGESTIONS:
   β–ͺ️ links--contextual.html.twig
   βœ… links.html.twig
-->
<!-- πŸ’‘ BEGIN CUSTOM TEMPLATE OUTPUT from 'themes/custom/newshubten/templates/navigation/links.html.twig' -->
<!-- πŸ₯• Component start: radix:nav --><ul class="contextual-links nav" data-component-id="radix:nav" hidden=""><li class="nav-item  "></li><li class="nav-item  "></li><li class="nav-item  "></li></ul><!-- πŸ₯• Component end: radix:nav -->
<!-- END CUSTOM TEMPLATE OUTPUT from 'themes/custom/newshubten/templates/navigation/links.html.twig' -->

</div>

Same issue occurs in using layout builder:


<div data-contextual-id="layout_builder_block:section_storage_type=overrides&amp;section_storage=node.64426&amp;delta=0&amp;region=content&amp;uuid=f27b83bc-0130-42d2-a92e-d0af9b81a3bb:operations=move%3Aupdate%3Aremove&amp;langcode=en" data-contextual-token="cqcAtlNgHBYvH1I7po0yj56APuZongntk-v4Gnli-ok" data-drupal-ajax-container="" data-once="contextual-render" class="contextual"><button class="trigger focusable visually-hidden" type="button" aria-pressed="false">Open  configuration options</button>

<!-- THEME DEBUG -->
<!-- THEME HOOK: 'links__contextual' -->
<!-- FILE NAME SUGGESTIONS:
   β–ͺ️ links--contextual.html.twig
   βœ… links.html.twig
-->
<!-- πŸ’‘ BEGIN CUSTOM TEMPLATE OUTPUT from 'themes/custom/newshubten/templates/navigation/links.html.twig' -->
<!-- πŸ₯• Component start: radix:nav --><ul class="contextual-links nav" data-component-id="radix:nav" hidden=""><li class="nav-item  "></li><li class="nav-item  "></li><li class="nav-item  "></li><li class="nav-item  "></li></ul><!-- πŸ₯• Component end: radix:nav -->
<!-- END CUSTOM TEMPLATE OUTPUT from 'themes/custom/newshubten/templates/navigation/links.html.twig' -->

</div>

Problem/Motivation

Unable to use contextual menus

Steps to reproduce

Upgrade Drupal installation to 10.3.2
Update Radix to most recent version
Observe contextual links not populated.

πŸ› Bug report
Status

Closed: cannot reproduce

Version

6.0

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States mindbet

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

  • Issue created by @mindbet
  • πŸ‡ΊπŸ‡ΈUnited States mindbet

    It looks like the issue is fixed like this

    --- a/docroot/themes/custom/newshubten/components/nav/nav.twig
    +++ b/docroot/themes/custom/newshubten/components/nav/nav.twig
    @@ -39,12 +39,9 @@
     %}
     
     {% if items %}
       <ul {{ attributes.addClass(nav_classes) }}>
    -    {% block nav_items %}
    +    {% block items %}
           {% for item in items %}
             {%
               set nav_item_classes = [
                 'nav-item',
    

    (newshubten is the theme name; i left it in the code snippet to help direct you to the file that needs to be changed)

  • Status changed to Closed: cannot reproduce 2 months ago
  • I can't recreate this and it works as expected. Maybe something has changed since you've created your Sub-theme.

Production build 0.71.5 2024