diff --git a/core/modules/migrate_drupal_ui/src/Form/IdConflictForm.php b/core/modules/migrate_drupal_ui/src/Form/IdConflictForm.php
index 4146bb41d88..1ac25a629a3 100644
--- a/core/modules/migrate_drupal_ui/src/Form/IdConflictForm.php
+++ b/core/modules/migrate_drupal_ui/src/Form/IdConflictForm.php
@@ -94,7 +94,10 @@ class IdConflictForm extends MigrateUpgradeFormBase {
$form['warning'] = [
'#type' => 'markup',
- '#markup' => '
' . $this->t('It looks like you have content on your new site which may be overwritten if you continue to run this upgrade. The upgrade should be performed on a clean Drupal 8 installation. For more information see the upgrade handbook.', [':id-conflicts-handbook' => 'https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#id_conflicts']) . '
',
+ '#markup' => '' . $this->t('It looks like you have content on your new site which may be overwritten if you continue to run this upgrade. The upgrade should be performed on a clean Drupal @version installation. For more information see the upgrade handbook.', [
+ '@version' => $this->destinationSiteVersion,
+ ':id-conflicts-handbook' => 'https://www.drupal.org/docs/8/upgrade/known-issues-when-upgrading-from-drupal-6-or-7-to-drupal-8#id_conflicts',
+ ]) . '
',
];
return $form;
diff --git a/core/modules/migrate_drupal_ui/src/Form/IncrementalForm.php b/core/modules/migrate_drupal_ui/src/Form/IncrementalForm.php
index 3807a280d17..21c82bc5762 100644
--- a/core/modules/migrate_drupal_ui/src/Form/IncrementalForm.php
+++ b/core/modules/migrate_drupal_ui/src/Form/IncrementalForm.php
@@ -82,7 +82,10 @@ class IncrementalForm extends MigrateUpgradeFormBase {
// https://www.drupal.org/node/2687849
$form['upgrade_option_item'] = [
'#type' => 'item',
- '#prefix' => $this->t('An upgrade has already been performed on this site. To perform a new migration, create a clean and empty new install of Drupal 8. Rollbacks are not yet supported through the user interface. For more information, see the upgrading handbook.', [':url' => 'https://www.drupal.org/upgrade/migrate']),
+ '#prefix' => $this->t('An upgrade has already been performed on this site. To perform a new migration, create a clean and empty new install of Drupal @version. Rollbacks are not yet supported through the user interface. For more information, see the upgrading handbook.', [
+ '@version' => $this->destinationSiteVersion,
+ ':url' => 'https://www.drupal.org/upgrade/migrate',
+ ]),
'#description' => $this->t('Last upgrade: @date', ['@date' => $this->dateFormatter->format($date_performed)]),
];
return $form;
diff --git a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeFormBase.php b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeFormBase.php
index 193620dfcd3..30c1091b100 100644
--- a/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeFormBase.php
+++ b/core/modules/migrate_drupal_ui/src/Form/MigrateUpgradeFormBase.php
@@ -25,6 +25,13 @@ abstract class MigrateUpgradeFormBase extends FormBase {
*/
protected $store;
+ /**
+ * The destination site major version.
+ *
+ * @var string
+ */
+ protected $destinationSiteVersion;
+
/**
* Constructs the Migrate Upgrade Form Base.
*
@@ -60,6 +67,8 @@ abstract class MigrateUpgradeFormBase extends FormBase {
* {@inheritdoc}
*/
public function buildForm(array $form, FormStateInterface $form_state) {
+ // Get the current major version.
+ list($this->destinationSiteVersion) = explode('.', \Drupal::VERSION, 2);
$form = [];
$form['actions']['#type'] = 'actions';
$form['actions']['submit'] = [
diff --git a/core/modules/migrate_drupal_ui/src/Form/OverviewForm.php b/core/modules/migrate_drupal_ui/src/Form/OverviewForm.php
index 11abdbd1b57..f5df55570c1 100644
--- a/core/modules/migrate_drupal_ui/src/Form/OverviewForm.php
+++ b/core/modules/migrate_drupal_ui/src/Form/OverviewForm.php
@@ -34,7 +34,8 @@ class OverviewForm extends MigrateUpgradeFormBase {
$form['#title'] = $this->t('Upgrade');
$form['info_header'] = [
- '#markup' => '' . $this->t('Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal 8. See the Drupal site upgrades handbook for more information.', [
+ '#markup' => '
' . $this->t('Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal @version. See the Drupal site upgrades handbook for more information.', [
+ '@version' => $this->destinationSiteVersion,
':url' => 'https://www.drupal.org/upgrade/migrate',
]),
];
@@ -45,7 +46,7 @@ class OverviewForm extends MigrateUpgradeFormBase {
$form['legend']['#markup'] .= '
' . $this->t('Old site') . '';
$form['legend']['#markup'] .= '' . $this->t('The site you want to upgrade.') . '';
$form['legend']['#markup'] .= '' . $this->t('New site') . '';
- $form['legend']['#markup'] .= '' . $this->t('This empty Drupal 8 installation you will import the old site to.') . '';
+ $form['legend']['#markup'] .= '' . $this->t('This empty Drupal @version installation you will import the old site to.', ['@version' => $this->destinationSiteVersion]) . '';
$form['legend']['#markup'] .= '';
$info[] = $this->t('Make sure that access to the database for the old site is available from this new site.');
diff --git a/core/modules/migrate_drupal_ui/src/Form/ReviewForm.php b/core/modules/migrate_drupal_ui/src/Form/ReviewForm.php
index 5be85c42f21..040f39eaa13 100644
--- a/core/modules/migrate_drupal_ui/src/Form/ReviewForm.php
+++ b/core/modules/migrate_drupal_ui/src/Form/ReviewForm.php
@@ -120,7 +120,7 @@ class ReviewForm extends MigrateUpgradeFormBase {
'#type' => 'table',
'#header' => [
$this->t('Drupal @version', ['@version' => $version]),
- $this->t('Drupal 8'),
+ $this->t('Drupal @version', ['@version' => $this->destinationSiteVersion]),
],
];
@@ -161,7 +161,7 @@ class ReviewForm extends MigrateUpgradeFormBase {
'#type' => 'table',
'#header' => [
$this->t('Drupal @version', ['@version' => $version]),
- $this->t('Drupal 8'),
+ $this->t('Drupal @version', ['@version' => $this->destinationSiteVersion]),
],
];
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php
index 8ca811ccb4a..5eb14ccdd51 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeExecuteTestBase.php
@@ -11,6 +11,13 @@ abstract class MigrateUpgradeExecuteTestBase extends MigrateUpgradeTestBase {
use CreateTestContentEntitiesTrait;
+ /**
+ * The destination site major version.
+ *
+ * @var string
+ */
+ protected $destinationSiteVersion;
+
/**
* {@inheritdoc}
*/
@@ -19,6 +26,9 @@ abstract class MigrateUpgradeExecuteTestBase extends MigrateUpgradeTestBase {
// Create content.
$this->createContent();
+
+ // Get the current major version.
+ [$this->destinationSiteVersion] = explode('.', \Drupal::VERSION, 2);
}
/**
@@ -34,7 +44,7 @@ abstract class MigrateUpgradeExecuteTestBase extends MigrateUpgradeTestBase {
$connection_options = $this->sourceDatabase->getConnectionOptions();
$this->drupalGet('/upgrade');
$session = $this->assertSession();
- $session->responseContains('Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal 8.');
+ $session->responseContains("Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal $this->destinationSiteVersion.");
$this->drupalPostForm(NULL, [], t('Continue'));
$session->pageTextContains('Provide credentials for the database of the Drupal site you want to upgrade.');
@@ -99,7 +109,7 @@ abstract class MigrateUpgradeExecuteTestBase extends MigrateUpgradeTestBase {
// Restart the upgrade process.
$this->drupalGet('/upgrade');
- $session->responseContains('Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal 8.');
+ $session->responseContains("Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal $this->destinationSiteVersion.");
$this->drupalPostForm(NULL, [], t('Continue'));
$session->pageTextContains('Provide credentials for the database of the Drupal site you want to upgrade.');
@@ -140,7 +150,7 @@ abstract class MigrateUpgradeExecuteTestBase extends MigrateUpgradeTestBase {
$this->createContentPostUpgrade();
$this->drupalGet('/upgrade');
- $session->pageTextContains('An upgrade has already been performed on this site. To perform a new migration, create a clean and empty new install of Drupal 8. Rollbacks are not yet supported through the user interface.');
+ $session->pageTextContains("An upgrade has already been performed on this site. To perform a new migration, create a clean and empty new install of Drupal $this->destinationSiteVersion. Rollbacks are not yet supported through the user interface.");
$this->drupalPostForm(NULL, [], t('Import new configuration and content from old site'));
$this->drupalPostForm(NULL, $edits, t('Review upgrade'));
$session->pageTextContains('WARNING: Content may be overwritten on your new site.');
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php
index 84a7ba4ad82..0e45d19c8f0 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/MigrateUpgradeFormStepsTest.php
@@ -62,7 +62,9 @@ class MigrateUpgradeFormStepsTest extends BrowserTestBase {
// Overview form and for an incremental migration it is the Incremental
// form.
$session = $this->assertSession();
- $expected['initial'] = 'Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal 8.';
+ // Get the current major version.
+ list($destination_site_version) = explode('.', \Drupal::VERSION, 2);
+ $expected['initial'] = "Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal $destination_site_version.";
$expected['incremental'] = "An upgrade has already been performed on this site.";
foreach (['/upgrade', '/upgrade/incremental'] as $expected) {
@@ -113,7 +115,7 @@ class MigrateUpgradeFormStepsTest extends BrowserTestBase {
// Test that the credential form is displayed for incremental migrations.
$store->set('step', 'overview');
$this->drupalGet('/upgrade');
- $session->pageTextContains('An upgrade has already been performed on this site. To perform a new migration, create a clean and empty new install of Drupal 8. Rollbacks are not yet supported through the user interface.');
+ $session->pageTextContains("An upgrade has already been performed on this site. To perform a new migration, create a clean and empty new install of Drupal $destination_site_version. Rollbacks are not yet supported through the user interface.");
$this->drupalPostForm(NULL, [], t('Import new configuration and content from old site'));
$session->pageTextContains('Provide credentials for the database of the Drupal site you want to upgrade.');
}
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/IdConflictTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/IdConflictTest.php
index 30df7b5a335..b629b452931 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/IdConflictTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/IdConflictTest.php
@@ -74,7 +74,7 @@ class IdConflictTest extends MigrateUpgradeExecuteTestBase {
$connection_options = $this->sourceDatabase->getConnectionOptions();
$this->drupalGet('/upgrade');
$session = $this->assertSession();
- $session->responseContains('Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal 8.');
+ $session->responseContains("Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal $this->destinationSiteVersion.");
$this->drupalPostForm(NULL, [], t('Continue'));
$session->pageTextContains('Provide credentials for the database of the Drupal site you want to upgrade.');
@@ -102,7 +102,7 @@ class IdConflictTest extends MigrateUpgradeExecuteTestBase {
// Start the upgrade process.
$this->drupalGet('/upgrade');
- $session->responseContains('Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal 8.');
+ $session->responseContains("Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal $this->destinationSiteVersion.");
$this->drupalPostForm(NULL, [], t('Continue'));
$session->pageTextContains('Provide credentials for the database of the Drupal site you want to upgrade.');
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/NodeClassicTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/NodeClassicTest.php
index 1e5f4a32292..093944b8930 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d6/NodeClassicTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d6/NodeClassicTest.php
@@ -84,7 +84,7 @@ class NodeClassicTest extends MigrateUpgradeExecuteTestBase {
$connection_options = $this->sourceDatabase->getConnectionOptions();
$this->drupalGet('/upgrade');
$session = $this->assertSession();
- $session->responseContains('Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal 8.');
+ $session->responseContains("Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal $this->destinationSiteVersion.");
$this->drupalPostForm(NULL, [], t('Continue'));
$session->pageTextContains('Provide credentials for the database of the Drupal site you want to upgrade.');
@@ -112,7 +112,7 @@ class NodeClassicTest extends MigrateUpgradeExecuteTestBase {
// Start the upgrade process.
$this->drupalGet('/upgrade');
- $session->responseContains('Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal 8.');
+ $session->responseContains("Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal $this->destinationSiteVersion.");
$this->drupalPostForm(NULL, [], t('Continue'));
$session->pageTextContains('Provide credentials for the database of the Drupal site you want to upgrade.');
diff --git a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/IdConflictTest.php b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/IdConflictTest.php
index 36f9aac39d2..0fc8f13e473 100644
--- a/core/modules/migrate_drupal_ui/tests/src/Functional/d7/IdConflictTest.php
+++ b/core/modules/migrate_drupal_ui/tests/src/Functional/d7/IdConflictTest.php
@@ -76,7 +76,7 @@ class IdConflictTest extends MigrateUpgradeExecuteTestBase {
$connection_options = $this->sourceDatabase->getConnectionOptions();
$this->drupalGet('/upgrade');
$session = $this->assertSession();
- $session->responseContains('Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal 8.');
+ $session->responseContains("Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal $this->destinationSiteVersion.");
$this->drupalPostForm(NULL, [], t('Continue'));
$session->pageTextContains('Provide credentials for the database of the Drupal site you want to upgrade.');
@@ -104,7 +104,7 @@ class IdConflictTest extends MigrateUpgradeExecuteTestBase {
// Start the upgrade process.
$this->drupalGet('/upgrade');
- $session->responseContains('Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal 8.');
+ $session->responseContains("Upgrade a site by importing its files and the data from its database into a clean and empty new install of Drupal $this->destinationSiteVersion.");
$this->drupalPostForm(NULL, [], t('Continue'));
$session->pageTextContains('Provide credentials for the database of the Drupal site you want to upgrade.');