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') ->...
Clive's user avatar
  • 167k
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 ...
Clive's user avatar
  • 167k
5 votes
Accepted

Moved an old installation profile now site is broken

A profile is like a module or theme, you have to uninstall it first before you can remove it from the file system. Additionally a profile can't just be uninstalled like a module. You need to switch ...
4uk4's user avatar
  • 99.6k
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 ...
CG Monroe's user avatar
  • 3,056
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 ....
Adrian Cid Almaguer's user avatar
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 ...
Berdir's user avatar
  • 83.2k
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 ...
Wayne Eaker's user avatar
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 ...
Adrian Cid Almaguer's user avatar
4 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
Yuseferi's user avatar
  • 22k
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 ...
Kevin's user avatar
  • 27.8k
4 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 ...
Clive's user avatar
  • 167k
4 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 --...
sonfd's user avatar
  • 7,911
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']['#...
Clive's user avatar
  • 167k
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('...
israelshmueli's user avatar
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.
Smurfy's user avatar
  • 31
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 ...
apaderno's user avatar
  • 97.4k
3 votes

Can't load form from my Install Profile

Ok, guys - I just sorted this out! But you have all been awesome, thanks a bunch! Following leymanxx suggestions, I replaced 'function' => '\Drupal\business_profile\src\Form\WelcomeForm' with '...
ilechcod's user avatar
  • 123
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 ...
Krishna Mohan's user avatar
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 ...
Kartagis's user avatar
  • 612
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 ...
israelshmueli's user avatar
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 (...
Shawn Conn's user avatar
  • 26.9k
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 ...
apaderno's user avatar
  • 97.4k
2 votes

Moved an old installation profile now site is broken

There's an approach to fix your problem which doesn't involve switching the profile at all: Edit the profile's .info.yml file, and change the key for the list of modules from required to install. This ...
Clive's user avatar
  • 167k
1 vote

Import content using the "Default Content for D8" module

This will be probably resolved by setting the _links type href domain as http://drupal.org (the default links domain used by default_content module) in yor .json files to import, instead of drupal-pro-...
Pan Chrono's user avatar
  • 1,943
1 vote
Accepted

How to programmatically disable Global Theme Settings?

See here for a related question. The theme settings are not individually saved as variables. They are all in a single variable, whose name depends on your theme. For example, if your theme name is ...
Frank H.'s user avatar
  • 804
1 vote

How do I add default content?

The issues I see are three: As pointed out from Clive, the YAML file is invalid. The second line needs to be indented. dependencies: - default_content You can use the content of minimal.info.yaml ...
apaderno's user avatar
  • 97.4k
1 vote
Accepted

How to add GitHub repositories in Profile Installation

The easiest way is to add the dependencies to your profile's composer.json file, and use Composer to install the profile into your project. The dependencies will be automatically downloaded with it. ...
Clive's user avatar
  • 167k
1 vote

How to create a Drupal 8 distribution

What you need is to create an installation profile. Follow the instructions on drupal. How to write a D8 profile Move the files from the config/sync folder to config/install folder. Be sure to ...
johnatasjmo's user avatar
1 vote

Configuration management with different database and websites

Basically you need to make sure both sites share the same UUID. Do you have drush? If so: In the shell of your old site (copying from) get the UUID drush cget system.site uuid (You'll get ...
100pic's user avatar
  • 1,287

Only top scored, non community-wiki answers of a minimum length are eligible