reverted: --- b/core/modules/config_translation/src/Plugin/migrate/source/d6/ProfileFieldTranslation.php +++ a/core/modules/config_translation/src/Plugin/migrate/source/d6/ProfileFieldTranslation.php @@ -14,7 +14,7 @@ */ class ProfileFieldTranslation extends DrupalSqlBase { + /** - /** * {@inheritdoc} */ public function query() { reverted: --- b/core/modules/content_translation/migrations/d6_taxonomy_term_translation.yml +++ a/core/modules/content_translation/migrations/d6_taxonomy_term_translation.yml @@ -5,7 +5,7 @@ - Content source: plugin: d6_taxonomy_term + translations: true - translations: i18n process: # If you are using this file to build a custom migration consider removing # the tid field to allow incremental migrations. diff -u b/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php b/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php --- b/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php +++ b/core/modules/migrate_drupal/src/Plugin/migrate/source/DrupalSqlBase.php @@ -105,7 +105,7 @@ if ($this->pluginDefinition['requirements_met'] === TRUE) { // For i18n translations migrate_drupal_i18n must be enabled. - if (strpos($this->getSourceModule(), 'i18n') !== false) { + if (strpos($this->getSourceModule(), 'i18n') !== FALSE) { if (!\Drupal::service('module_handler') ->moduleExists('migrate_drupal_i18n')) { throw new RequirementsException("The module migrate_drupal_i18n is not enabled on the new site."); diff -u b/core/modules/migrate_drupal_i18n/migrate_drupal_i18n.info.yml b/core/modules/migrate_drupal_i18n/migrate_drupal_i18n.info.yml --- b/core/modules/migrate_drupal_i18n/migrate_drupal_i18n.info.yml +++ b/core/modules/migrate_drupal_i18n/migrate_drupal_i18n.info.yml @@ -1,6 +1,6 @@ name: 'Migrate Drupal i18n' type: module -description: 'Required for all i18n migrations.' +description: 'Provides a requirement for all i18n migrations.' package: 'Core (Experimental)' core: 8.x dependencies: diff -u b/core/modules/migrate_drupal_i18n/migrate_drupal_i18n.module b/core/modules/migrate_drupal_i18n/migrate_drupal_i18n.module --- b/core/modules/migrate_drupal_i18n/migrate_drupal_i18n.module +++ b/core/modules/migrate_drupal_i18n/migrate_drupal_i18n.module @@ -2,11 +2,10 @@ /** * @file - * Alert administrators before starting the import process. + * A requirement for migrating i18n translations. */ use Drupal\Core\Routing\RouteMatchInterface; -use Drupal\Core\Url; /** * Implements hook_help(). @@ -16,11 +15,7 @@ case 'help.page.migrate_drupal_i18n': $output = ''; $output .= '
' . t('The Migrate Drupal i18n module is a requirement for i18n migrations..'); - - $output .= '
' . t('The Migrate Drupal i18n module is a requirement for i18n migrations. For more information, see the online documentation for the Migrate Drupal i18n module.', - [':migrate' => 'https://www.drupal.org/upgrade/migrate']) . '
'; - + $output .= '' . t('The Migrate Drupal i18n module is a requirement for migrating i18n translations. It does not provide a user interface. For more information, see the online documentation for the Migrate Drupal i18n module.', [':migrate_drupal_i18n' => 'https://www.drupal.org/docs/8/core/modules/experimental-migrate-drupal-i18n']) . '
'; return $output; } } diff -u b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6ReviewPagei18nTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6ReviewPageTest.php --- b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6ReviewPagei18nTest.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6ReviewPageTest.php @@ -2,22 +2,30 @@ namespace Drupal\Tests\migrate_drupal_ui\Functional\d6; +use Drupal\Tests\migrate_drupal_ui\Functional\MigrateUpgradeReviewPageTestBase; + /** * Tests migrate upgrade review page for Drupal 6. * * @group migrate_drupal_6 * @group migrate_drupal_ui */ -class MigrateUpgrade6ReviewPagei18nTest extends MigrateUpgrade6ReviewPageTest { +class MigrateUpgrade6ReviewPageTest extends MigrateUpgradeReviewPageTestBase { + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + $this->loadFixture(drupal_get_path('module', 'migrate_drupal') . '/tests/fixtures/drupal6.php'); + } /** - * Modules to enable. - * - * @var array + * {@inheritdoc} */ - public static $modules = [ - 'migrate_drupal_i18n', - ]; + protected function getSourceBasePath() { + return __DIR__ . '/files'; + } /** * {@inheritdoc} @@ -36,7 +44,6 @@ 'filefield', 'filter', 'forum', - 'i18ntaxonomy', 'imagecache', 'imagefield', 'language', @@ -119,6 +126,7 @@ 'i18npoll', 'i18nprofile', 'i18nsync', + 'i18ntaxonomy', 'i18nviews', 'phone', 'views', diff -u b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6i18nTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php --- b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6i18nTest.php +++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/MigrateUpgrade6Test.php @@ -12,7 +12,7 @@ * * @group migrate_drupal_ui */ -class MigrateUpgrade6i18nTest extends MigrateUpgrade6Test { +class MigrateUpgrade6Test extends MigrateUpgradeExecuteTestBase { /** * Modules to enable. @@ -20,12 +20,35 @@ * @var array */ public static $modules = [ - 'migrate_drupal_i18n', + 'language', + 'content_translation', + 'migrate_drupal_ui', + 'telephone', + 'aggregator', + 'book', + 'forum', + 'statistics', + 'migration_provider_test', ]; /** * {@inheritdoc} */ + protected function setUp() { + parent::setUp(); + $this->loadFixture(drupal_get_path('module', 'migrate_drupal') . '/tests/fixtures/drupal6.php'); + } + + /** + * {@inheritdoc} + */ + protected function getSourceBasePath() { + return __DIR__ . '/files'; + } + + /** + * {@inheritdoc} + */ protected function getEntityCounts() { return [ 'aggregator_item' => 1, @@ -108,7 +131,6 @@ 'filefield', 'filter', 'forum', - 'i18ntaxonomy', 'imagecache', 'imagefield', 'language', @@ -158,5 +180,18 @@ 'i18nprofile', + 'i18ntaxonomy', ]; } + /** + * Executes all steps of migrations upgrade. + */ + public function testMigrateUpgradeExecute() { + parent::testMigrateUpgradeExecute(); + + // Ensure migrated users can log in. + $user = User::load(2); + $user->passRaw = 'john.doe_pass'; + $this->drupalLogin($user); + } + }