From ca8a550c056875254ff001b6b610d51b51eea761 Mon Sep 17 00:00:00 2001
From: xjm <xjm@65776.no-reply.drupal.org>
Date: Thu, 31 Jan 2019 16:29:57 -0600
Subject: [PATCH] Issue #3029819 by tim.plunkett, bnjmnm, tedbow, xjm: Do not
 allow Page Title block to be placed in Layout Builder until it works properly

---
 core/modules/layout_builder/layout_builder.module         | 8 ++++++++
 .../tests/src/Functional/LayoutBuilderTest.php            | 1 +
 2 files changed, 9 insertions(+)

diff --git a/core/modules/layout_builder/layout_builder.module b/core/modules/layout_builder/layout_builder.module
index 1bd16a02a626..71265e2d46c6 100644
--- a/core/modules/layout_builder/layout_builder.module
+++ b/core/modules/layout_builder/layout_builder.module
@@ -174,6 +174,14 @@ function layout_builder_cron() {
   }
 }
 
+/**
+ * Implements hook_plugin_filter_TYPE__CONSUMER_alter().
+ */
+function layout_builder_plugin_filter_block__layout_builder_alter(array &$definitions, array $extra) {
+  // @todo Restore the page title block in https://www.drupal.org/node/2938129.
+  unset($definitions['page_title_block']);
+}
+
 /**
  * Implements hook_plugin_filter_TYPE_alter().
  */
diff --git a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
index b1ddaa7f0f11..cfa154aa7b0f 100644
--- a/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
+++ b/core/modules/layout_builder/tests/src/Functional/LayoutBuilderTest.php
@@ -514,6 +514,7 @@ public function testLayoutBuilderChooseBlocksAlter() {
     // Verify that blocks explicitly removed are not present.
     $assert_session->linkNotExists('Help');
     $assert_session->linkNotExists('Sticky at top of lists');
+    $assert_session->linkNotExists('Page title');
 
     // Verify that Changed block is not present on first section.
     $assert_session->linkNotExists('Changed');
-- 
GitLab