The detection of install profiles is faulty, with all existing sites being imported as the first profile found. In my case it was the
hosting site (hence all profiles said hostmaster).

This is a bit tricky since the data is stored inside the imported site's database, so we will need to connect to the database, and retrieve the information from the variables table for each site that is imported.

The current problematic implementation uses provision_drupal_switch_active_site and variable_get, but there seems to be a caching problem with the global $conf variable. A more accurate way will involve using provision_set_active_db($db_url) and doing a query, returning the result through unserialize.

Comments

adrian’s picture

Title: Incorrect detection of install profiles on imported sites » Incorrect detection of install profiles and languages on imported sites

Extending this to languages too. It's the same couple of lines of code, as I need to connect to the database the site is running as to make sure it works.

adrian’s picture

We need to connect to the database for each site, for potentially hundreds of databases.

Drupal has no method of closing connections, hence we will need to clone and extend part of the database api for aegir, as we
simply can not modify any code in core.

This is troublesome, but unfortunately it needs to be done, as we can't create hundreds of connections for one or two queries each.

adrian’s picture

Status: Active » Fixed

Fixed now.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.