It should be possible to take a non-subdirectory site (e.g. site1.example.com), and rename it to become one (e.g. example.com/site1).

However, this doesn't actually work:

  1. Run a migrate task on the site.
  2. Change the site name by moving the domain prefix after a slash.
  3. Save the form.

The following validation error message presents itself:

To migrate a site you need to modify at least one of the following fields: Domain name, Platform or Database server

Comments

colan created an issue. See original summary.

colan’s picture

Status: Active » Needs work
StatusFileSize
new1.63 KB

Here's a Hosting patch that unblocks the validation error, the migration seems to run fine, but then the site won't load, and then strange things start happening. The login link produces:

The website encountered an unexpected error. Please try again later.

aegir@aegir:~/hostmaster-7.x-3.180/sites/all/modules/hosting$ drush @site1.example.com ws --tail --full
Drupal\Core\DependencyInjection\ContainerNotInitializedException: \Drupal::$container is not initialized yet. \Drupal::setContainer() must be called with a real container. in /var/aegir/platforms/drupal_8_core/core/lib/Drupal.php on line 130 #0 /var/aegir/platforms/drupal_8_core/core/lib/Drupal.php(509): Drupal::getContainer() [...]
aegir@aegir:~/hostmaster-7.x-3.180/sites/all/modules/hosting$ drush @site1.example.com provision-verify
Changed group ownership of <code>/var/aegir/platforms/drupal_8_core/sites/site1.example.com/local.settings.php to www-data[success]
Changed permissions of <code>/var/aegir/platforms/drupal_8_core/sites/site1.example.com/local.settings.php to 440         [success]
Changed permissions of /var/aegir/platforms/drupal_8_core/sites/site1.example.com/settings.php to 640                            [success]
Generated config in write(): Drupal settings.php file (/var/aegir/platforms/drupal_8_core/sites/site1.example.com/settings.php)  [success]
Changed permissions of /var/aegir/platforms/drupal_8_core/sites/site1.example.com/settings.php to 440                            [success]
Change group ownership of /var/aegir/platforms/drupal_8_core/sites/site1.example.com/settings.php to www-data                    [success]
Changed permissions of /var/aegir/platforms/drupal_8_core/sites/site1.example.com/aegir.services.yml to 640                      [success]
Generated config in write(): Drupal aegir.services.yml file                                                                      [success]
(/var/aegir/platforms/drupal_8_core/sites/site1.example.com/aegir.services.yml)
Changed permissions of /var/aegir/platforms/drupal_8_core/sites/site1.example.com/aegir.services.yml to 440                      [success]
Change group ownership of /var/aegir/platforms/drupal_8_core/sites/site1.example.com/aegir.services.yml to www-data              [success]
Platforms path /var/aegir/platforms exists.                                                                                      [success]
Platforms ownership of /var/aegir/platforms has been changed to aegir.                                                           [success]
Platforms permissions of /var/aegir/platforms have been changed to 755.                                                          [success]
Platforms path /var/aegir/platforms is writable.                                                                                 [success]
PDOException: SQLSTATE[HY000] [1045] Access denied for user 'site1exampleco_0'@'localhost' (using password: YES) in              [error]
/var/aegir/platforms/drupal_8_core/core/lib/Drupal/Core/Database/Driver/mysql/Connection.php:417
[...]
colan’s picture