- π³π±Netherlands renΓ© bakx Netherlands
Added some more context to this issue.
Original Issue
Our Website has the latest Drupal 9 version.
After installation of the module I don't see any changes on the layout builder page. No contextual links are shown.
----------------------------------------------------------------------
A bit more context on the situation on when the contextual links actually disappear, as it only happens when you enabled Claro or Gin as admin theme for layout builder at this moment.
In Drupal 9.5.9 (or maybe earlier 9.5 builds as well), the new Claro admin theme has a function that removes alle contextual links except those for `layout_builder_block`. See https://git.drupalcode.org/project/drupal/-/blob/9.5.x/core/themes/claro...
This module however doesn't add a new action such as layout_builder_block but creates it's own new id and thus the links get removed by Claro from the rendering at all.
A Core Layout Builder Block adds the contextual links as operations via metadata in the contextual_links array.
array (
'layout_builder_block' =>
array (
'route_parameters' =>
array (
'section_storage_type' => 'overrides',
'section_storage' => 'node.146',
'delta' => 0,
'region' => 'content',
'uuid' => '30245a98-3780-4986-88c1-38090f2edcb9',
),
'metadata' =>
array (
'operations' => 'move:update:remove',
'layout_builder_modal' => 'acd2c493db88742db40392cd77d09ff61c99f9f04f263389c072b00200fd6dc3',
),
),
)
This module doesn't do that, but creates it's own instance with another name.
array (
'layout_builder_inline_block_translation' =>
array (
'route_parameters' =>
array (
'section_storage_type' => 'overrides',
'section_storage' => 'node.146',
'delta' => 0,
'region' => 'content',
'uuid' => '30245a98-3780-4986-88c1-38090f2edcb9',
'langcode' => 'es',
),
'metadata' =>
array (
'layout_builder_modal' => 'acd2c493db88742db40392cd77d09ff61c99f9f04f263389c072b00200fd6dc3',
),
),
)
The quick fix is, rather bluntly patch Claro with the attached patch. However I personally think this is not really sustainable in the long run.
The best way forward is adding a new 'action' to the core Layout builder block contextual link. And I've tried this already however I couldn't find a good way to do this without a lot of refactoring. Mostly due to lack of knowledge on how this module internally handles things in combination with simply not enough time to hack on this.
Active
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Added some more context to this issue.