add custom block in layout builder sidebar shows old block labels that were updated

Created on 8 November 2022, about 2 years ago
Updated 20 February 2024, 10 months ago

Problem/Motivation

If you edit the label of a block type and you add a custom block in one layout builder layout the list of available custom blocks is still showing the old labels before the edit took place. I've tested locally in a Drupal 9.4.8. and a clean Drupal 10.1.x-dev install with php 8.1.11.

Steps to reproduce

  • Install Layout Builder
  • Go to /admin/structure/block/block-content/types create a new block type second block
  • Activate layout builder for the article content type at /admin/structure/types/manage/article/display
  • click manage layout
  • add a block in an existing section or create a new section and add a block there.
  • click create custom block -> you should see basic block and second block available. all good
  • go back to /admin/structure/block/block-content/types and edit both block types and change their name from basic block to basic block updated and second block to second block updated
  • go back to the layout. click add block in the main window and then add custom block in the sidebar again.

=> the output is still showing basic block and second block
=> I had to clear the cache before the updated labels were shown in the sidebar

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Release notes snippet

๐Ÿ› Bug report
Status

Closed: cannot reproduce

Version

11.0 ๐Ÿ”ฅ

Component
Layout builderย  โ†’

Last updated 4 days ago

Created by

๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

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.

  • ๐Ÿ‡ณ๐Ÿ‡ฟNew Zealand danielveza Brisbane, AU

    Hello! Thanks for raising an issue.

    I've attempted to replicate this on a fresh install of Drupal core. I'm not able to replicate this so I'm closing this issue.

    The replication steps I followed based on the IS:

    1. Install fresh D11 standard profile
    2. Enable LB
    3. Add LB to Articles & make it overridable
    4. Create a block called "Second block"
    5. Create a new Article and go to LB on it
    6. Verify both blocks are listed under "Create content block".
    7. Close the off canvas.
    8. In a seperate tab, update the label of "Second block" to "Second block (updated)"
    9. In the first tab, click "Create custom block" again
    10. Verify that the second blocks label is "Second block (Updated)"

    If you're able to replicate this again on Drupal 11 feel free to reopen and list the new steps to replicate :)

  • ๐Ÿ‡ฉ๐Ÿ‡ชGermany rkoller Nรผrnberg, Germany

    thanks for testing @danielveza! i've stumbled across that issue back then in the context of moving the different block pages for drupal 10.1.0. but i haven't revisited the problem since then. i've tried to reproduce the problem in 11.x-dev now but i am also unable to. looks like something has changed then fixing the problem from back then. thanks again for taking a look and closing!

Production build 0.71.5 2024