7

Is there a way to remove the core installation profiles that come with drupal without the need of hacking core? i.e. is there a hook that can run to alter this list?

The reason why this is required is that we are making a custom install profile for use with aegir, and do not want the default core drupal 'minimal' and 'standard' install profiles as options for the users to create new sites.

Perhaps this could be a hook in aegir?

Has anyone found an elegant solution to this?

2
  • 2
    I have found no hook for that, I think you have not many choice but remove the minimal and standard folders from /profiles Commented Sep 7, 2011 at 9:03
  • Agreed... I've always just manually edited or deleted the profiles as necessary. This is certainly a weakness of Aegir as it currently works. Commented Dec 22, 2011 at 16:30

3 Answers 3

3

Build a simple module for your Aegir instance that implements hook_form_alter() to hide the Standard/Minimal profile options.

4

You need to add exclusive = 1 line in the .info file of your profile.

1

This is how I did it and let me know please if there is smarter way.

  1. From the core I learned that the install is using maintenance theme or 'seven' if none defined. So I created a new 'my_install' sub-theme. Seven theme is its base theme. I replaced the logo.png with my site's logo, created template.php and added hook_form_alter() to it to unset the Standard and Minimum profiles:

    function my_install_form_alter(&$form, &$form_state, $form_id) { if ($form_id == 'install_select_profile_form') { $form['profile']['My profile']['#attributes'] = array('checked' => 'checked'); unset($form['profile']['Standard']); unset($form['profile']['Minimal']); } } 
  2. Now to make install to use my_install theme I changed settings.php and default.settings.php by adding to both

    $conf['maintenance_theme'] = 'my_install'; 

that is it.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.