Getting ajax error while moving block from one section to another in Layout Builder.

Created on 9 September 2025, 22 days ago

Problem/Motivation

Getting ajax error while moving block from one section to another in Layout Builder.

InvalidArgumentException: Invalid UUID "right" in Drupal\layout_builder\Section->getComponent() (line 197 of /app/docroot/core/modules/layout_builder/src/Section.php).

Steps to reproduce

  1. Currently I am on Drupal 10.3.14
  2. Go to /node/nid/layout page
  3. While moving block from one section to another or in same section. Getting error.

Proposed resolution

Somehow $uuid is coming as section name in MoveBlockForm::title. I have added a check on uuid to fix this.

public function title(SectionStorageInterface $section_storage, $delta, $uuid) {
    if (preg_match('/^[0-9a-f]{8}-([0-9a-f]{4}-){3}[0-9a-f]{12}$/i', $uuid)) {
      $block_label = $section_storage
        ->getSection($delta)
        ->getComponent($uuid)
        ->getPlugin()
        ->label();

      return $this->t('Move the @block_label block', ['@block_label' => $block_label]);
    }
    return $this->t('Invalid UUID: @uuid', ['@uuid' => $uuid]);
  }

Not sure its right solution or not.

Remaining tasks

User interface changes

Introduced terminology

API changes

Data model changes

Release notes snippet

🐛 Bug report
Status

Active

Version

10.3

Component

layout_builder.module

Created by

🇮🇳India pankajsachdeva

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

Comments & Activities

Production build 0.71.5 2024