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
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
Comment #2
hideaway commentedUsing the following patch to resolve the issue.
Comment #3
hideaway commentedNoticed that contextual links for inline blocks were not covered. Fixing this.
Comment #4
hideaway commentedComment #5
gaurav-mathur commentedThe 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
Comment #6
smustgrave commentedThis 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
Comment #10
arunkumarkCreated 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.phpComment #11
smustgrave commentedChange still needs test coverage.
Comment #12
ressinelRerolled for 11.2
Comment #14
oily commentedFixed merge conflict. Fixed PHPCS.