Add layout builder (inline) block support

Created on 29 November 2019, over 4 years ago
Updated 7 May 2024, about 1 month ago

When using the layout builder the suggestion does not include blocks created with the layout builder.

We should add the blocks from the full page view mode to the suggestions when creating a job.

Promoting due to the wide adoption of Layout Builder.

✨ Feature request
Status

Needs work

Version

1.0

Component

Core

Created by

πŸ‡«πŸ‡·France nod_ Lille

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡΅πŸ‡­Philippines johnrosswvsu

    I can confirm that the nested inline blocks are being sent and received but once the entities are saved the nested inline block is not saved. If if they are saved the wrong revision or target_id is used in the translation.

  • πŸ‡΅πŸ‡­Philippines larvymortera

    Here's an updated patch addressing the nested inline blocks issue.

  • πŸ‡΅πŸ‡­Philippines johnrosswvsu

    Can confirm that the patch on #25 applies cleanly and that the nested (child) inline blocks are translated.

  • πŸ‡΅πŸ‡­Philippines johnrosswvsu

    Add a check if the field exists.

  • πŸ‡΅πŸ‡­Philippines johnrosswvsu
  • πŸ‡―πŸ‡΄Jordan Odai Jbr

    there is another issue in the patch, a huge number is created from each translated block... after translating a page that has a layout containing 4 blocks only we found that the blocks has been created multiple times, same content and everything but duplicated many times.. we found this after we noticed the site became too slow..

  • πŸ‡―πŸ‡΄Jordan Ahmad Khader

    This patch addresses the following issues within the system, specifically tested on 'layout_builder_at':

    1. Remove Duplicated Blocks:
    Duplicated blocks of code or content are now systematically removed, enhancing system efficiency and minimizing redundancy.

    2. Separate Inline Block Translations with Unique IDs:
    Each inline block's translation is assigned a unique ID, intricately connected with the original ID within the configuration. This prevents inline blocks from disappearing in the source language when updating other translations. Notably, the configuration of the component's fixability becomes crucial, as it ensures a sensible handling of inline block translations.

    3. Restrict Display of Inline Blocks on Source Page:
    Given that inline blocks are inherently connected to entities and cannot be individually translated, there is no need to display them on the source page. This restriction streamlines the visual presentation of the source page.

    4. Enhance Functionality of Inline-Block Translations and Nested Inline Blocks:
    Bugs have been addressed, and new features have been added to optimize the translation process:

    - Blocks not present in the source language can now be retained without disappearing during translation requests.
    - Adding a new block in the source language and subsequently requesting translation via TMGMT will only include the newly added block and they will appear on the bottom of the page to void conflicting with other blocks.
    - For retranslation needs, simply deleting a block from the translated entity and requesting translation will seamlessly add it again.

    It's important to note that this patch has undergone testing exclusively on 'layout_builder_at'. If you have further questions or need additional details on the implementation, feel free to inquire.

  • πŸ‡―πŸ‡΄Jordan Ahmad Khader

    continuation of patches #30-#32 fixes.
    This patch addresses the error with Drupal\Core\Entity\EntityStorageException: Invalid translation language (es) specified, caused by non-Block content type entities accessing the code.

  • πŸ‡ΊπŸ‡¦Ukraine nginex

    Guys,

    Please do not refactor/fix coding standards of non-related code to this issue, you are causing at least a merge conflict and a lot of mess, this is not a scope of the issue, it's a purpose of a separate issue in the project

Production build 0.69.0 2024