Kuntafi base template build with Drupal 8

Installs: 81

Dependents: 0

Suggesters: 0

Stars: 2

Watchers: 1

Forks: 0

Open Issues: 10


v0.1 2018-12-04 12:39 UTC


This project template should provide a kickstart for managing your site dependencies with Composer.


First you need to install Composer and Git.

Note: The instructions below refer to the global composer installation. You might need to replace composer with php composer.phar (or similar) for your setup.

After that you can create the project:

composer create-project burdamagazinorg/thunder-project ProjectToWorkWith --stability dev --no-interaction

With composer require ... you can download new dependencies to your installation.

cd ProjectToWorkWith

The composer create-project command passes ownership of all files to the project that is created. You should create a new git repository, and commit all files not excluded by the .gitignore file.

git init
Initialized empty Git repository in /ProjectToWorkWith/.git/

Add KuntafiBase as dependency

composer require kuntaliitto/kuntafibase:8.x.6.x-dev

Run composer install

composer install

What does the template do?

When installing the given composer.json some tasks are taken care of:

  • Drupal will be installed in the docroot-directory.
  • Autoloader is implemented to use the generated composer autoloader in vendor/autoload.php, instead of the one provided by Drupal (docroot/vendor/autoload.php).
  • Modules (packages of type drupal-module) will be placed in docroot/modules/contrib/
  • Theme (packages of type drupal-theme) will be placed in docroot/themes/contrib/
  • Profiles (packages of type drupal-profile) will be placed in docroot/profiles/contrib/
  • Downloads Drupal scaffold files such as index.php, or .htaccess
  • Creates sites/default/files-directory.
  • Latest version of drush is installed locally for use at bin/drush.
  • Latest version of DrupalConsole is installed locally for use at bin/drupal.

Installing KuntafiBase

Create project will install KuntafiBase into the docroot/profiles/contrib directory inside of ProjectToWorkWith. You can now install KuntafiBase as you would with any Drupal 8 site. See: Drupal installation guide.

There might be some cotchas during installation and it might fail to finnish. It is new feature to Drupal handle installations based on another distribution. Manual installation is documented in this document later.

Updating KuntafiBase

This project will attempt to keep all of your ProjectToWorkWith and Drupal Core files up-to-date; the project drupal-composer/drupal-scaffold is used to ensure that your scaffold files are updated every time drupal/core is updated. If you customize any of the "scaffolding" files (commonly .htaccess), you may need to merge conflicts if any of your modfied files are updated in a new release of Drupal core.

Follow the steps below to update your KuntafiBase files.

  1. Run composer update kuntaliitto/kuntafibase:8.x.6.x-dev
  2. Run git diff to determine if any of the scaffolding files have changed. Review the files for any changes and restore any customizations to .htaccess or robots.txt.
  3. Commit everything all together in a single commit, so docroot will remain in sync with the core when checking out branches or running git bisect.
  4. In the event that there are non-trivial conflicts in step 2, you may wish to perform these steps on a branch, and use git merge to combine the updated core files with your customized files. This facilitates the use of a three-way merge tool such as kdiff3. This setup is not necessary if your changes are simple; keeping all of your modifications at the beginning or end of the file is a good strategy to keep merges easy.

Updating Thunder

KuntafiBase is based on Thunder -distribution. We use it as base and extend its structure. This said, our ProjectToWorkWith needs to keep eye on Thunder releases too.

in composer.json edit the line: "burdamagazinorg/thunder": "~8.2", and run composer update burdamagazinorg/thunder


Should I commit the contrib modules I download

Composer recommends no. They provide argumentation against but also workrounds if a project decides to do it anyway.

How can I apply patches to downloaded modules?

If you need to apply patches (depending on the project being modified, a pull request is often a better solution), you can do so with the composer-patches plugin.

To add a patch to drupal module foobar insert the patches section in the extra section of composer.json:

"extra": {
    "patches": {
        "drupal/foobar": {
            "Patch description": "URL to patch"

How can I prevent downloading modules from Thunder, that I do not need?

To prevent downloading a module, that Thunder provides but that you do not need, add a replace block to your composer.json:

"replace": {
    "burdamagazinorg/infinite_theme": "*",
    "burdamagazinorg/infinite_module": "*",
    "drupal/ivw_integration": "*",
    "drupal/nexx_integration": "*",
    "drupal/riddle_marketplace": "*",
    "valiton/harbourmaster": "*",
    "drupal/adsense": "*",
    "drupal/liveblog": "*"

This example prevents any version of the feature module to be downloaded.

Manual installation

Installaatio failed debug


An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /core/install.php?profile=kuntafibase&langcode=en&id=1&op=do_nojs&op=do
StatusText: OK
ResponseText: Drupal\Core\Config\UnmetDependenciesException: 

Configuration objects provided by <em class="placeholder">thunder</em> have unmet dependencies: 
<em class="placeholder">block.block.thunder_base_account_menu (thunder_base)</em> in Drupal\Core\Config\UnmetDependenciesException::create() (line 98 of /var/www/html/docroot/core/lib/Drupal/Core/Config/UnmetDependenciesException.php).
drush cim --partial --source="profiles/contrib/thunder/config/install"
drush cim --partial --source="profiles/contrib/thunder/config/optional"
drush config-delete blazy.settings
drush config-delete shariff.settings
drush config-delete paragraphs_features.settings
drush en blazy
drush en shariff
drush en paragraphs_features
drush en thunder_article thunder_media thunder_paragraphs thunder_taxonomy thunder_updater -y
drush then thunder_base -y
drush then thunder_admin -y
drush cim --partial --source="profiles/contrib/kuntafibase/config/install" -y
drush en kuntafibase_core kuntafibase_basic_article kuntafibase_contacts, kuntafibase_basic_page -y
drush en kuntafibase_now kuntafibase_paragraphs kuntafibase_blog kuntafibase_book -y

Local development

Development will happen in your ProjectToWorkWith folder. You need local development environment to install/test/configure the project.

We have successfully used Drupal4Docker, but you are free to use other tools like DDEV.


Acquia BLT can create a deployment artifact of your local project to separate production repository.

Platform.sh has few yml -files to add into ProjectToWorkWithfolder enabling deployments into their cloud.

We have successfully created also Azure App Service -based image to run code in Azure.