diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php index df8ffad..653b647 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldInstanceTest.php @@ -195,16 +195,16 @@ public function testTextFieldInstances() { $errors = array_map(function($message) {return $message->message;}, $messages); $this->assertCount(8, $errors); sort($errors); - $message = 'Can\'t migrate source field field_text_long_plain_filtered configured with both plain text and filtered text processing.'; + $message = 'Can\'t migrate source field field_text_long_plain_filtered configured with both plain text and filtered text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'; $this->assertEquals($errors[0], $message); $this->assertEquals($errors[1], $message); - $message = 'Can\'t migrate source field field_text_plain_filtered configured with both plain text and filtered text processing.'; + $message = 'Can\'t migrate source field field_text_plain_filtered configured with both plain text and filtered text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'; $this->assertEquals($errors[2], $message); $this->assertEquals($errors[3], $message); - $message = 'Can\'t migrate source field field_text_sum_plain configured with both plain text processing and text_with_summary.'; + $message = 'Can\'t migrate source field field_text_sum_plain of type text_with_summary configured with plain text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'; $this->assertEquals($errors[4], $message); $this->assertEquals($errors[5], $message); - $message = 'Can\'t migrate source field field_text_sum_plain_filtered configured with both plain text processing and text_with_summary.'; + $message = 'Can\'t migrate source field field_text_sum_plain_filtered of type text_with_summary configured with plain text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'; $this->assertEquals($errors[6], $message); $this->assertEquals($errors[7], $message); } diff --git a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php index 828755a..083af22 100644 --- a/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php +++ b/core/modules/field/tests/src/Kernel/Migrate/d7/MigrateFieldTest.php @@ -150,10 +150,10 @@ public function testTextFields() { $errors = array_map(function($message) {return $message->message;}, $messages); sort($errors); $this->assertCount(4, $errors); - $this->assertEquals($errors[0], 'Can\'t migrate source field field_text_long_plain_filtered configured with both plain text and filtered text processing.'); - $this->assertEquals($errors[1], 'Can\'t migrate source field field_text_plain_filtered configured with both plain text and filtered text processing.'); - $this->assertEquals($errors[2], 'Can\'t migrate source field field_text_sum_plain configured with both plain text processing and text_with_summary.'); - $this->assertEquals($errors[3], 'Can\'t migrate source field field_text_sum_plain_filtered configured with both plain text processing and text_with_summary.'); + $this->assertEquals($errors[0], 'Can\'t migrate source field field_text_long_plain_filtered configured with both plain text and filtered text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'); + $this->assertEquals($errors[1], 'Can\'t migrate source field field_text_plain_filtered configured with both plain text and filtered text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'); + $this->assertEquals($errors[2], 'Can\'t migrate source field field_text_sum_plain of type text_with_summary configured with plain text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'); + $this->assertEquals($errors[3], 'Can\'t migrate source field field_text_sum_plain_filtered of type text_with_summary configured with plain text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text'); } } diff --git a/core/modules/text/src/Plugin/migrate/field/d7/TextField.php b/core/modules/text/src/Plugin/migrate/field/d7/TextField.php index 53e0938..c3d24c2 100644 --- a/core/modules/text/src/Plugin/migrate/field/d7/TextField.php +++ b/core/modules/text/src/Plugin/migrate/field/d7/TextField.php @@ -50,15 +50,15 @@ public function getFieldType(Row $row) { // If a text or text_long field has both plain text and filtered text // instances, skip the row. elseif ($plain_text && $filtered_text) { - $fieldName = $row->getSourceProperty('field_name'); - throw new MigrateSkipRowException("Can't migrate source field $fieldName configured with both plain text and filtered text processing."); + $field_name = $row->getSourceProperty('field_name'); + throw new MigrateSkipRowException("Can't migrate source field $field_name configured with both plain text and filtered text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text"); } } elseif ($type == 'text_with_summary' && $plain_text) { // If a text_with_summary field has plain text instances, skip the row // since there's no such thing as a string_with_summary field. - $fieldName = $row->getSourceProperty('field_name'); - throw new MigrateSkipRowException("Can't migrate source field $fieldName configured with both plain text processing and text_with_summary."); + $field_name = $row->getSourceProperty('field_name'); + throw new MigrateSkipRowException("Can't migrate source field $field_name of type text_with_summary configured with plain text processing. See https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#plain-text"); } return $type;