From 37dfbf4ffaf637d7788eb46d52d7c74b9d5677b5 Mon Sep 17 00:00:00 2001
From: stargayte <stargayte@3344054.no-reply.drupal.org>
Date: Fri, 22 Oct 2021 20:49:59 -0400
Subject: [PATCH] Issue #3177011 by phjou, HongPong: Migration is crashing when
 wordpress exports empty title

---
 migrations/wordpress_content.yml | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/migrations/wordpress_content.yml b/migrations/wordpress_content.yml
index 8f58d78..79cb891 100644
--- a/migrations/wordpress_content.yml
+++ b/migrations/wordpress_content.yml
@@ -60,7 +60,11 @@ process:
   # type mapping is dynamically generated.
   # uid mapping is dynamically generated.
   # tag/category field mappings are dynamically generated.
-  title: title
+  title:
+    plugin: skip_on_empty
+    method: row
+    source: title
+    message: 'Cannot import empty titles. This may include trashed posts from the WordPress import file.'
   # @todo: Will need process plugin to rewrite links/img refs.
   # @link https://www.drupal.org/node/2742279
   'body/value': content
-- 
GitLab