Closed (outdated)
Project:
Domain
Version:
7.x-3.4
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
25 Oct 2012 at 16:44 UTC
Updated:
2 May 2025 at 12:49 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
agentrickardThis is considered a "convenience" feature for most users. We need a smart way to shut it off.
In an install profile, can you set a variable before module install? If so, we can read that variable in domain_enable().
If your installer can add data to the {domain} table before enabling domain, then the auto-create should not happen.
Comment #2
Marvine commentedHi,
Thank you for your answer.
Finally, it's ok with this following code in my installation profile :
Comment #3
agentrickardI just realized how dumb my last statement was. You can't add data to {domain} before it exists.
How are you able to preselect the domains as part of an install profile? Wouldn't those domains vary per install, or are you doing a project-specific profile?
Comment #4
mac_weber commentedI have the same question about exporting the install profile to a different server which uses a different base domain.
By now I think I will hack it using
sedto replace strings in the install profile.Comment #5
scottalan commentedI just ran into this issue after I set everything up and added it to my install profile. Any updates on this? If not I was wondering if we could just create a variable (in Domain Access) that could be set in the install profile. Then if have Domain Access check for the variable and if the variable exists, because it was set in the install profile, then the logic that creates the default Drupal - localhost entry could just be bypassed. This is just a thought as I haven't looked through the code yet to see how that is being created yet...but I am about to.
Comment #6
scottalan commentedok, I think I found where this happens. Is it in
domain_default()? I think the profile gets installed last so maybe this wouldn't work after all. Still thinking...Comment #7
scottalan commentedI did find a way to add a variable during the profile install process before modules are enabled if it helps anyone else.
In MYPROFILE.profile you just need to add:
These of course are just example variables but it does work.
So this is possible:
Comment #8
scottalan commentedI've tested this with my install profile and it works great. Only thing is...you have to install through the UI apparently for
hook_install_tasks()to get called. I ran the install usingdrush site-installand they were never set. I'm trying to find out if there is a way to set these when using drush as it's my preferred method when installing the site. If anyone has a tip, please share.EDIT:
Ok, I played around with the profile a bit and got this to work for drush. Here is what I did:
In the PROFILE.profile file.
I'll upload a patch I had to make to get this to work.
Comment #9
scottalan commentedThis patch also includes these as well. Not trying to make it confusing but wanted all this functionality in a single patch.
https://drupal.org/node/2159423
https://drupal.org/node/2159443
Comment #10
bluegeek9 commentedDrupal 7 in End of Life and no longer supported. We encourage you to upgrade to a supported version of Drupal. For more information, see https://www.drupal.org/upgrade.