I recently imported two different drupal platforms that contained sites. They came from different aegir instances previously.

In both cases the Profile was never set for either site, and now I cannot migrate these sites to another platform. Is there a way that I can fix this as these platforms were Standard normal Drupal instances (nothing fancy).

Even if someone could give me advice on how to change this in the DB that would be amazing.

Comments

ShaneOnABike created an issue. See original summary.

Jon Pugh’s picture

Priority: Normal » Major

The fact that there is no UI to change the profile for a site has always been a big problem.

We also should not store the profile as the package ID, but just as the profile string.

The fix is to look for the "Package" node for the standard profile and use that NID to insert into the hosting_site.profile DB column.

I actually can't remember if it's the package NID or the package instance ID, you'll have to look into other sites in the hosting_site table.

ShaneOnABike’s picture

Agreed that perhaps the UI could allow a user to edit this field. It's really not that clear.

To be clearer for other folks trying the same thing:

  1. Find another site and either click on the Profile link and/or hover to determine the NID
  2. drush sqlc
  3. select * hosting_site;
    You will see a listing of all your sites and the nodes that have no platform will contain a 0 entry
  4. UPDATE hosting_site set profile = NID where nid = xyz;
    Replace NID with teh platform NID, and xyz with the sites NID
colan’s picture

Title: Imported Platform & Site causes site to not have a Profile set » Allow for setting a site's profile from the Aegir front-end
Category: Bug report » Feature request
Related issues: +#1170362: Install profile is disabled for lots of different reasons and core doesn't allow for that

+1 for being able to set this in the Aegir UI. Patches would definitely be welcome.

Should we move to Hosting?

Jon Pugh’s picture

Title: Allow for setting a site's profile from the Aegir front-end » Imported Platform & Site causes site to not have a Profile set
Category: Feature request » Bug report

Hang on there, it's still a bug if the import is breaking.

Let's create another issue for the new feature of editing install profile, that needs a lot of work.

SocialNicheGuru’s picture

I had something similar happen when importing a platform which in turn imported a site.
The site has no install profile.
But if I create a new site from the same profile, the install profile is there.

here is the issue I closed as a dupe which has a little more detail:
https://www.drupal.org/project/hostmaster/issues/3121402#comment-13520365

colan’s picture

Let's create another issue for the new feature of editing install profile, that needs a lot of work.

Done!

SocialNicheGuru’s picture

WORKAROUND IN #3 WORKS with slight modification:

Find another site and either click on the Profile link and/or hover to determine the NID

drush sqlc
select * from hosting_site;    <- "from" added
You will see a listing of all your sites and the nodes that have no platform will contain a 0 entry
UPDATE hosting_site set profile = NID where nid = xyz;
Replace NID with teh platform NID, and xyz with the sites NID

and if you wanted to do it per platform you could use:
UPDATE hosting_site set profile = NID where platform = xyz;

(thanks to #3)

colan’s picture

Let's keep workaround discussions in the related issue, not here, as in this issue we're now simply talking about how to fix the initial problem.

I posted a single SQL command over there so the multiple steps posted in #3 and #8 here are no longer necessary.