I've been working on trying to write an installation profile for Dtupal 8 for almost a week now. I've followed the docs on Drupal.org: https://www.drupal.org/docs/8/creating-distributions/how-to-write-a-drupal-8-installation-profile

I've done this installation at least 5 times. I hit a number of different errors each time.

Error 1

After researching this issue, I'm told that when this error happens, I have to go into my settings.php file and change the profile from standard to my profile name. settings.php file

Error 2

I hit this issue every single time which really defeats that purpose of a profile. If the module is not in core, it SHOULD download it. It does not though. It throws this message. missing modules

Error 3

If I stumble through the installation and fix all of the errors above, I still hit this error when the site tries to work through setting up all of my configs.

enter image description here

I have also downloaded "known" working profiles and they do not work as well.

Having said all of this, the docs on Drupal.org are obviously lacking and missing something. I've asked for help on several post on Drupal.org and I've gotten no help or useful information.

If anyone can point me in the right direction, that would be great. This used to be the way we'd distribute sites to clients with D7 and I've written some fairly large D7 profiles, but I don't understand what the issue is with D8.

With D7, you used to be able to plug in a profile to the /profiles directory, run through the install, and the site would be setup. This feature for D8 seems incomplete or missing some requirements and documentation. Several other developers have commented that they have no been able to get this to work without hacking files and fumbling their way through it.

If I can get a grasp on why this isn't working, and what is missing from the documentation, I'm committed to fixing that issue so that others can use this functionality of D8.

  • 1
    The web installer in D7 didn't automatically download missing modules, maybe you had a drush.make file or something? In Drupal 8 you can use Composer to require the profile, and provide a list of its module dependencies in your profile's composer.json file; those will be automatically downloaded when your profile is. The config error message is telling you that config you have in /profiles/PROFILE/config/install declare dependencies on config that doesn't exist. Most likely those have been copy/pasted from standard profile without the necessary changes being made?
    – Clive
    Jan 15, 2018 at 21:33
  • Yeah, I you're right. It actually was from a make file. However, within the make file we downloaded the profile and put it in place. I've tried using a composer.json file. It doesn't even get read during the installation process. Keep in mind, we are talking about running the installation purely through the browser GUI. It is part of the requirements our clients have outlined. The Drupal.org docs don't mention a composer.json or where it should be placed in the profiles filesystem. I'm actually working on a make file right now, however, there are a lack of correct docs on this. Jan 15, 2018 at 21:40
  • You're pulling at a few different threads there - installation of files, as in getting them into a location the web server can serve them, is one part, and installation of the CMS is another; they're deliberately separate things. Composer is useful for the first part, not so much the second (although you could, theoretically, invoke Compser as part of the install). Running the install through the UI won't be a problem, but getting the required files is part of the build process rather than installation
    – Clive
    Jan 15, 2018 at 21:46
  • And I agree, if the docs don't mention composer.json maybe they should - it's very useful for profiles
    – Clive
    Jan 15, 2018 at 21:51
  • The Docs I'm talking about are the first link in the original question above. So if a composer.json file is required for this to work, why isn't it mentioned on that page? So I'm just trying to find the correct way to do this so can pass it on to others. Thanks for your help. Any little bit is useful. I'm likely going to have to make a distribution for this to work properly. It's just more code to deploy and more code to maintain and update. Jan 15, 2018 at 21:53


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.