Config Import Issue

Created on 7 May 2018, over 6 years ago
Updated 27 May 2023, over 1 year ago

I have domain access installed and when I go to setup different home pages for each domain I get this error when trying to import the config.

The configuration cannot be imported because it failed validation for the following reasons:
Configuration domain_logo.settings depends on the domain_logo extension that will not be installed after import.

This is my config name
domain.config.batesvilledental_com.en.system.site

This is the config
name: โ€˜Batesville Dental Group'
page:
front: /node/35

๐Ÿ› Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

๐Ÿ‡บ๐Ÿ‡ธUnited States rfulcher

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium tim-diels Belgium ๐Ÿ‡ง๐Ÿ‡ช
  • Status changed to Fixed over 1 year ago
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium tim-diels Belgium ๐Ÿ‡ง๐Ÿ‡ช

    Thanks for the work done, I committed this.

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

  • Status changed to Fixed over 1 year ago
  • ๐Ÿ‡ซ๐Ÿ‡ทFrance andrimont

    Hello all,

    I still encounter this issue on
    Drupal 10.0.9
    PHP 8.1.18
    MariaDB 10.5.19-MariaDB-0+deb11u2
    DAL domain_access_logo 2.0.2

    The configuration cannot be imported because it failed validation for the following reasons:
    Configuration <strong>domain_logo.settings</strong> depends on the <strong>domain_logo</strong> extension that will not be installed after import.

    I had this issue already before upgrading DAL to the 2.0.2 version.
    I do not think that I should use the patch.

    Any idea of a fix as it is very troublesome ?

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium tim-diels Belgium ๐Ÿ‡ง๐Ÿ‡ช

    You still have the old config. There is no automatic update path provided. We could maybe do this. But the manual update path would be to rename the domain_logo.settings to domain_access_logo.settings in your config folder and rename the module dependency in the file from domain_logo to domain_access_logo.

    Typing this from the beach so is untested but should work.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance andrimont

    Thank you Tim,
    but I see no file as the domain_logo.settings :

    $ grep -rl "domain_logo.settings" .
    ./modules/contrib/domain_access_logo/src/Form/DomainAccessLogoSettingsForm.php

    And $ nano ./modules/contrib/domain_access_logo/src/Form/DomainAccessLogoSettingsForm.php shows :

       */
      public function getFormId() {
        return 'domain_logo_settings';
      }
    
      /**
  • ๐Ÿ‡ง๐Ÿ‡ชBelgium tim-diels Belgium ๐Ÿ‡ง๐Ÿ‡ช

    I mean the configuration from your website. It is stored in the database but is also exported and imported when you use CI/CD to deploy your website.

    So not the module config itself which it only used at install of the module and should be good already.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance andrimont

    Fantastic Tim !
    Thank you, I found indeed both a domain_access_logo.settings and a domain_logo.settings in the table config of the database.
    Now I can process the Import Configuration. I can work on the sites now. Merci.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance andrimont

    One thing :

    Should I change in ./modules/contrib/domain_access_logo/src/Form/DomainAccessLogoSettingsForm.php shows :

    This

      public function getFormId() {
        return 'domain_logo_settings';
      }

    to

      public function getFormId() {
        return 'domain_access_logo_settings';
      }

    ?

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium tim-diels Belgium ๐Ÿ‡ง๐Ÿ‡ช

    That should be changed yes. But we need to test nothing breaks and also document the change as this will change form alter hooks. You can suggest the change in a new issue.

  • ๐Ÿ‡ซ๐Ÿ‡ทFrance andrimont

    Tim :

    That should be changed yes. But we need to test nothing breaks and also document the change as this will change form alter hooks. You can suggest the change in a new issue.

    I am teasing it and will come back w/ result.

  • ๐Ÿ‡ง๐Ÿ‡ชBelgium tim-diels Belgium ๐Ÿ‡ง๐Ÿ‡ช

    It is not tied to the config name but more to allow to form_alter on this specified ID. So it wonโ€™t break normally. Only thing is that it could break sites having a form alter on that ID.

Production build 0.71.5 2024