Move que system.theme.yml from install to optional, from the core theme, to avoid "[ERROR] Configuration objects (system.theme) provided by system already exist in active configuration" and to use a custom theme in the install step

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

rzanetti created an issue. See original summary.

rzanetti’s picture

ccarrascal’s picture

Hi, I have the same error while installing. I have tried the patch in #2, but it doesn't work for me.
What worked is moving the system.theme.yml file from:

./web/core/modules/system/config/install/system.theme.yml

To:
./web/core/modules/system/config/optional/system.theme.yml

Honestly, I don't know the repercussions that this change may have during a standard install, as I am using a custom profile.

Any ideas about how to fix this?

PS: I have the same problem in 8.6.4

ccarrascal’s picture

Hi again,

I have created a patch to move system.theme.yml file from:

./web/core/modules/system/config/install/system.theme.yml

To:
./web/core/modules/system/config/optional/system.theme.yml

This solution is working for me in 8.6.4 when installing with a custom profile.
It needs to be tested in a clean Drupal installation.

EDIT:
I just found that my problem was that after running a composer update or composer install,
I was ending up with two copies of system.theme.yml file, in different locations:

  • web/core/modules/system/config/install/system.theme.yml
  • web/core/config/install/system.theme.yml: This one does not exists in a clean Drupal install

So i just added a line in my composer file to remove that file manually. I still don't know the root cause,
because I don't see that extra file in web/core/config/install/system.theme.yml on a clean Drupal installation,
so it may be coming in one of the core patches that I am already using.

So this patch that I just uploaded should be useless for most of the people.

EDIT 2:
I just found out that my issue was due to this patch:
https://www.drupal.org/files/issues/2018-07-12/1356276-473.patch

This is part of this ticket:
https://www.drupal.org/project/drupal/issues/1356276

I have updated to the last patch in that issue and it solved my problem.

So there is no need to use my patch.

Berdir’s picture

Category: Bug report » Support request
Status: Active » Fixed

Non-config entity configuration can't be in optional, that doesn't make sense, it doesn't have dependencies.

You can't provide simple configuration of a different module, that's just not supported. only install profiles can do that.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

svrl’s picture

I have solved this issue using Configuration synchronization delete in Development tab in Drupal 8 settings "/admin/config/development/configuration".

1. access this URL
2. Config. type set as "Simple configuration"
3. Config. name set as "nameofyourtheme.settings"
4. Press "delete"
5. You can now reinstall/install your module which had active configuration issue