11
votes
Accepted
How to set a default theme programmatically
Looking at ThemeController::setDefaultTheme (the request handler for the /admin/appearance/default route), this should do the trick:
\Drupal::configFactory()
->getEditable('system.theme')
->...
8
votes
Accepted
Is there a way to inherit a Drupal installation profile?
Doing some research and testing I found a way to inherit Drupal installation profiles, using drush make (works in Drupal 7).
1) Apply Drupal patch #47 submitted in this topic
projects[drupal][type]...
7
votes
Accepted
How to install an existing Drupal profile with drush?
To build on what Patrick said, if the profile is not already in your profile directory, you can download it with Drush dl:
drush dl drupal --drupal-project-rename=drupal
cd drupal
drush dl commons
...
6
votes
Accepted
How to switch 'standard' installation profile to 'minimal' in existing site?
Installation profiles contain code to set up a site during installation, that's all they do. They aren't useful to an installed site.
Trying to change the profile after installation could never ...
5
votes
Accepted
How to install Drupal without interaction via web UI?
You can Install Drupal using Drush without interacting WEB UI.
You have to use following command
drush dl drupal-7.x --drupal-project-rename=D7
cd D7
drush site-install standard --account-name=admin ...
5
votes
Where is the "Add fields" button on content types when using the Minimal installation profile?
The minimal profile lives up to its name - the vast majority of modules aren't installed when using it.
This include the core Field UI module, which provides the UI you're missing. Just enable that ...
4
votes
Accepted
Is it possible to do a Drush make custom installation profile?
You can use the OPTIONAL ATTRIBUTES
root_element[first_key][next_key] = value
The 'projects' attribute is where you define the modules/themes that
are to be packaged with the profile. The first ...
4
votes
Features versus Configuration Management
I would advise using Features. This would allow not only exporting functionality and compartmentalizing it a lot easier, but you could also have the ability to bring in features later from an external ...
4
votes
Installation profile glitch
Those are not bugs and have nothing to do with locale.
The standard install profile sets up the administrator role, the theme configuration and many other things, see standard_install() and its ...
4
votes
Accepted
How do I enable User 1 rights in minimal installation?
User 1 doesn't need any roles to have super user status. User 1 is exempted from the permissions system entirely. So, they automatically have all permissions, regardless of roles they may or may not ...
4
votes
Accepted
How to enable modules through configuration?
This will not works because you are only saying to Drupal that your module is installed, but when you install a module there are other process that need to runs to import the configs and execute the ....
4
votes
How to enable modules through configuration?
A possible alternative would be use the dependencies section of a module's mymod.info.yml description. Enabling the module will enable the dependencies.
name: My Module
description: Provides ...
4
votes
Accepted
Can't preselect time zone in hook_form_alter
Drupal adds some JS to detect the timezone (through core/misc/timezone.js). This is interfering with your code, but can be removed easily:
unset($form['regional_settings']['date_default_timezone']['#...
3
votes
Accepted
How to define settings from an install profile
I can't find a hook called hook_profile_final on drupal.org. I also can't see where you found it on the link you're using (https://www.drupal.org/node/1022020). You are using an outdated version of ...
3
votes
Accepted
how do i programmatically set the ANONYMOUS USER permissions on a site install profile?
There is a constant for the anonymous RID named DRUPAL_ANONYMOUS_RID.
So, you would be able to use something like:
user_role_grant_permissions(DRUPAL_ANONYMOUS_RID, array('your permission 1'));
3
votes
Accepted
How to add dev modules to a distribution without getting security updates warnings?
Article Common Drush Make errors and their solutions has a solution for you. It seems that you should provide both branch and revision, if you want to clone exact revision and still have other info ...
3
votes
How to know current active installation profile like standard/minimal etc. on existing drupal site?
If you go to /admin/reports/status, under Drupal if you see something written after Drupal version, that's your installation profile. If there is nothing, that means it is Standard profile.
3
votes
How to switch 'standard' installation profile to 'minimal' in existing site?
There is no way to switch
you have two solution,
install again
remove standard modules.
lists the modules enabled by the Standard profile, as compared to the Minimal profile
3
votes
In custom install profile How to delete the "Footer" menu that core provides by default?
Solved.
Following https://drupal.stackexchange.com/a/186322/8938 I added the code below to my_profile_install() function inside my_profile.install file.
\Drupal::configFactory()->getEditable('...
3
votes
Accepted
Umami content not created
The Umami demo: Content module is not found from Drush, nor is it visible in the list of modules, because it is set as hidden in demo_umami_content.info.yml. If you change the hidden: true line in ...
3
votes
Accepted
Why does installing from an existing configuration fail?
I think option 1 is more of a hacky workaround than a recommended approach. I would avoid it in favor of option 2.
Re: option 2 failing, the error message is pretty clear - you can't use the --...
2
votes
How do I disable a core installation profile?
The Profile Switcher module for D7 may help: https://www.drupal.org/project/profile_switcher
2
votes
Hooks called after installation profile is installed?
Move your post-installation hooks to a module/part-of-your-profile (that can implement any hook and move things around even after the system modules is installed).
That way you can overcome problems ...
2
votes
append settings.php during profile installation
Checkout this post about Collecting and writing configuration settings to setting.php from an install profile.
It describes how a custom task (via hook_install_tasks_alter()) was injected into the ...
2
votes
How to know current active installation profile like standard/minimal etc. on existing drupal site?
Have a look at the function drupal_get_profile
Gets the name of the currently active installation profile.
When this function is called during Drupal's initial installation process, the name of the ...
2
votes
Change default option of installation profile
In your profile .info file you can add the distribution name property in the following format:
distribution:
name: ABCD
Notice: ADD this property but leave original top level "name" property in ...
2
votes
Accepted
Unable to choose an installation profile on a multi-site installation
In the .info.yml file, do no put distribution statement, ss mentioned in this guide:
# Optional: Declare your installation profile as a distribution
# This will make the installer auto-select this ...
2
votes
Where does the profile name on the Status Report come from?
When the status report is rendered, profile info is retrieved from drupal_get_profile() (by referencing the install_profile var) as well as system_get_info() to retrieve all the metadata properties (...
2
votes
Where does the profile name on the Status Report come from?
The installation profile name given in the status report is output from system_requirements(), which uses the following code. (Note that code outputs the installation profile name and, between ...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
installation-profile × 1198 × 46
7 × 24
drush × 17
installation × 17
configuration × 15
distributions × 8
theming × 6
blocks × 6
forms × 5
users × 4
features × 4
aegir × 4
database × 3
routes × 3
i18n-l10n × 3
updating × 3
composer × 3
views × 2
nodes × 2
commerce × 2
taxonomy-terms × 2
hooks × 2
wysiwyg × 2
deployment × 2