Module doesn't support Layout Builder Asymmetric Translation

Created on 28 April 2025, 19 days ago

Problem/Motivation

When having Layout Builder Asymmetric Translation installed and thus the ability to have different layouts / language the module disallows access to the translated layout by default.

Steps to reproduce

Have a multilingual website
Have Layout Builder Asymmetric Translation installed and configured as the widget.
Grant access to a role to access layout builder edit page
Try to edit a translation, it will end up with a 403 because of:
$this->handleTranslationAccess($result, $operation, $account);
In there is a default:

// Access is always denied on non-default translations.
    return $result->andIf(AccessResult::allowedIf(!($entity instanceof TranslatableInterface && !$entity->isDefaultTranslation())))->addCacheableDependency($entity);
  

Proposed resolution

Have a method to check if the layout_builder_at widget is in use?

Remaining tasks

Provide a patch and fix.

🐛 Bug report
Status

Active

Version

2.0

Component

Code

Created by

🇧🇪Belgium kevinvb

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

Merge Requests

Comments & Activities

  • Issue created by @kevinvb
  • 🇧🇪Belgium kevinvb

    I provided a quick simple check if the module exist before handling the translation and revoking access.
    I know this isn't the cleanest solution as it would be better if the content type is actually using assymetric translations for its layout.

    But lacking time to fix this cleanly for the current project I'm working on I provided a way forward if anyone would have a project using assymetric translations and would be in need of this module.

Production build 0.71.5 2024