Closed (fixed)
Project:
Multisite Manager
Version:
5.x-0.9-5
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
30 Nov 2007 at 13:57 UTC
Updated:
22 Feb 2008 at 22:21 UTC
The following patch adds a "batch creation" functionality to multisite_manager. This means that you can choose to delay the site creation upon running a script. The advantage of this is that you can synchronize running this script with other actions, such as creating simlinks or setting permissions.
| Comment | File | Size | Author |
|---|---|---|---|
| multisite_manager_batch_install.php_.txt | 1.05 KB | tatien | |
| multisite_manager.install.batch_creation.patch.txt | 1.74 KB | tatien | |
| multisite_manager.module.batch_creation.patch.txt | 5.91 KB | tatien |
Comments
Comment #1
schuyler1d commentedI'm not against incorporating your patch as-is (though, I'd have to actually test it first, a spot-check looks ok), but I'm more interested in your use-case.
If the purpose is really to give you an opportunity to run scripts before and/or after the installation, it seems an easier way that's also more drupaly would be to call module_invoke_all('before_multisite') and module_invoke_all('after_multisite').
Then you could make hooks in a separate module or theme that get called then. This would kill two birds with one stone, if this also solves this request: http://drupal.org/node/196492
My question to you is whether the delay of the site creation is essential for some other reason, or is it that you want to hook into the process? Even if the delay is important, it seems like this is a general feature that some enhancement on the cron side that would allow any node's creation to be delayed into a cron task.
Comment #2
davecormier commentedHere's the proof of concept php code for the permissions and roles. Still pretty preliminary, but you can see where it's going. The watchdog code simply grabs the watchdog info from ALL multisites and displays them in a single node on the 'master' site.
dbpr2.php supplies authentication and an array of database names.
Comment #3
schuyler1d commentedDuring installation, any watchdog messages go to the mainsite anyway (since watchdog switches the db back to the original anyway). Channeling these more explicitly might be something worth doing (presumably using the watchdog module hooks).
The rest seems like something that would go in a profile if I understand it correctly. But maybe the point is to perform actions globally AFTER installation? If so, then we're talking more about this kind of feature:
http://drupal.org/node/149337
I'm OK with discussing all these things, but we need to separate out what we're trying to do. You have a patch which allows for a delay in installation--is that something that is important as a feature--or is it a means to achieve something else? Either way, we need to flesh that out so we know what the code is achieving.
Comment #4
anarcat commentedThe idea behind this patch is to allow the creation process to be run in a privileged user that could create apache vhosts, edit bind zone files, etc.
We are planning to provide extensions, hooks, probably, to provide this functionality, as we found the current implementation a bit lacking in flexibility.
Of course, using hooks here is also appropriate.
Comment #5
schuyler1d commentedok, that's a use case I can get behind. To confirm how someone would run the script would be to chdir into the drupal home directory and run:
Should I apply this patch or is there a newer one with better hooks?
Comment #6
tatien commentedYes, please apply it.
BTW anarcat and I are currently in the process of developing a "drupalfarm" project for Koumbit and we have chosen multisite_manager as our administration interface for the Drupals. We'll concentrate on other issues before publishing a patch for this feature, with better hooks.
Comment #7
schuyler1d commentedi've applied the patch (with some minor tweaks) in the 1.0 beta. What is your advice for where to run the admin script? Is there a way that people can run it without moving it to the drupal directory? Also, is there a good way for people to specify the bootstrapped database to use? how does it guess the right one in your environment (I presume the main db is in the /sites/default/ directory?)
Comment #8
schuyler1d commentedalso, what is the status of your other work?
Comment #9
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.