Problem/Motivation

When you use layout builder symmetric translations then claro theme removes the contextual links and you cannot translate blocks in layout builder. This is because claro only keeps contextual links under layout_builder_block key. But with layout builder symmetric translation the links are stored under layout_builder_block_translation key.

Steps to reproduce

1. Use claro as admin theme
2. Enable layout builder
3. Enable layout builder symmetric translations either by using core patch:
http://www.drupal.org/node/2946333
Or installing layout_builder_st module
4. Enable module layout_builder_admin_theme so claro can be used as admin theme when editing layouts
5. Add secondary language
6. Create content, add custom block in layout builder
7. Translate the content into secondary language
8. Go to layout edit page of the translated node. The contextual links are missing as they are removed by claro theme

Proposed resolution

Claro should not remove contextual links.

Issue fork drupal-3324233

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

hideaway created an issue. See original summary.

hideaway’s picture

Using the following patch to resolve the issue.

hideaway’s picture

Noticed that contextual links for inline blocks were not covered. Fixing this.

hideaway’s picture

Status: Active » Needs review
gaurav-mathur’s picture

StatusFileSize
new67.53 KB

The patch #3 is applied successfully on drupal version 9.3.x and also applied on drupal 9.5.x and its working fine.
Thank you

smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs tests

This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

Can we get a test case to show this scenario please

Did not test

Version: 9.3.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

arunkumark made their first commit to this issue’s fork.

arunkumark’s picture

Status: Needs work » Needs review

Created MR for the patch #3. Not sure do we need a test case for the additional contrib module. Already there is a check for the title suffix and contextual link in /core/tests/Drupal/FunctionalTests/Theme/ClaroLayoutBuilderTest.php

smustgrave’s picture

Status: Needs review » Needs work

Change still needs test coverage.

ressinel’s picture

oily made their first commit to this issue’s fork.

oily’s picture

Fixed merge conflict. Fixed PHPCS.

Version: 11.x-dev » main

Drupal core is now using the main branch as the primary development branch. New developments and disruptive changes should now be targeted to the main branch.

Read more in the announcement.