- Issue created by @pankajsachdeva
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).
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.
Active
10.3 ✨
layout_builder.module