Problem/Motivation

After updating Radix from 6.0.0-beta7 to 6.0.0-beta8 (or 6.0.0-beta9 or current dev as of Feb 9th), the little edit button which appears when you hover a block to edit it is no more appearing (while still being in the code).

This is due to the radix block component twig template being rewritten between the 2 updates (b7 to higher) :

6.0.0-beta7 at line 47:

{% if html_tag %}
  <{{ html_tag }}{{ attributes|without('id').addClass(block_classes) }}>
{% endif %}

6.0.0-beta8 at line 47:

{% if block_html_tag %}
  <{{ block_html_tag }} {{ block_attributes|without('id').addClass(block_classes) }}>
{% endif %}

Mind the "attributes" been rewritten to "block_attributes"

Steps to reproduce

Create a child them using 6.0.0-beta7, all is good.
Same using 6.0.0-beta8 or above, edit button is missing for blocks.

Proposed resolution

As a temporary fix, I copied the all component folder to my child theme and updated the block.twig file so it says :

{% if block_html_tag %}
  <{{ block_html_tag }} {{ attributes|without('id').addClass(block_classes) }}>
{% endif %}

Remaining tasks

I think the radix block component should be fixed (or some dependencies) because if the attribute has been rewritten, there should be some reason behind.

Happy fixing ;-)

Comments

PhilY created an issue. See original summary.

phily’s picture

Of course, after copying the component to the child theme, all references to {% include 'radix:block' %} in the 'templates' folder should be updated to {% include 'SUBTHEME:block' %}

That's why to radix component should be fixed.

doxigo’s picture

Hey Philippe, do you still have this issue? I pushed a fix and this should be good on the latest dev

and not necessarily you don't need to update {% include 'radix:block' %} to {% include 'SUBTHEME:block' %} unless you need to modify it

phily’s picture

Yes, the fix from the latest dev release fixes it ;-), thanks.

doxigo’s picture

Status: Active » Fixed

Great to hear, thanks for your contribution, crediting and closing

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.