On config installation, I get

The configuration synchronization failed validation.

with the following message:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "configurable_language" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 130 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).

Drupal\Core\Entity\EntityTypeManager->getDefinition('configurable_language')
Drupal\Core\Entity\EntityTypeManager->getHandler('configurable_language', 'storage')
Drupal\Core\Entity\EntityTypeManager->getStorage('configurable_language')
Drupal\Core\Entity\EntityManager->getStorage('configurable_language')
entity_load('configurable_language', 'fr')
install_download_additional_translations_operations(Array)
install_import_translations(Array)
install_run_task(Array, Array)
install_run_tasks(Array)
install_drupal(Object)

I tested this patch but same error:
https://www.drupal.org/node/2613222#comment-10554230

Comments

GaëlG created an issue. See original summary.

gaëlg’s picture

I tried to add

  unset($tasks['install_import_translations']);
  unset($tasks['install_finish_translations']);

in config_installer_install_tasks_alter()
The install process finish, but it looks like some config was not imported.

alexpott’s picture

@GaëlG thanks for the issue report. Any chance you can describe the starting state for example do you have any contrib or custom modules being enabled? What is the site default language? And is their any chance you can provide a zio file of the configuration being using by the config installer?

alexpott’s picture

So what I think is happening here is that the initial configuration was exported from a site where language was not installed and then you've tried to use this configuration after selecting another language. If I do this I get...

Error
The website encountered an unexpected error. Please try again later.
Drupal\Component\Plugin\Exception\PluginNotFoundException: The "configurable_language" entity type does not exist. in Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 130 of core/lib/Drupal/Core/Entity/EntityTypeManager.php).
Drupal\Core\Entity\EntityTypeManager->getDefinition('configurable_language')
Drupal\Core\Entity\EntityTypeManager->getHandler('configurable_language', 'storage')
Drupal\Core\Entity\EntityTypeManager->getStorage('configurable_language')
Drupal\Core\Entity\EntityManager->getStorage('configurable_language')
entity_load('configurable_language', 'fr')
install_download_additional_translations_operations(Array)
install_import_translations(Array)
install_run_task(Array, Array)
install_run_tasks(Array)
install_drupal(Object)

So we need to detect when this is happening and stop the user from installing using existing configuration in these instances. Or could just alter the install language to the incoming default language.

alexpott’s picture

Status: Active » Needs review
StatusFileSize
new1.03 KB

The patch attached fixes the issue by changing the language to the configured site default.

gaëlg’s picture

Status: Needs review » Active
StatusFileSize
new21.54 KB

Thank you for your patch. Unfortunately it doesn't work. I get the exact same error. The conf comes from a french D8, and I'm trying to install in french too.
Here's an archive of my conf. It has to be noted that with this conf I also get these messages:

La configuration devel.settings dépend du module Devel qui ne sera pas installé après l'importation.
La configuration field_ui.settings dépend du module Field UI qui ne sera pas installé après l'importation.
La configuration menu_ui.settings dépend du module Menu UI qui ne sera pas installé après l'importation.
La configuration update.settings dépend du module Update Manager qui ne sera pas installé après l'importation.

(in english, "The config C depends on module M which won't be installed after import")
But this seems unrelated to me: it's because I used --skip-modules (https://pantheon.io/blog/using-configuration-module-filter-drush-8) on drush config-export so that these 4 modules not intended for production are not exported and commited to git. Their configuration is exported though, they just don't appear in core.extensions.yml.

gaëlg’s picture

Priority: Normal » Minor

Hum... I just added the 4 modules in core.extension.yml, and now this bug is away. Sorry, I should have checked before. I keep it open for maybe a graceful fallback/error message.
I still get an AJAX error a bit later in the process, during config entities import, but it might be unrelated.

alexpott’s picture

Priority: Minor » Normal

@GaëlG yeah but the problem fixed by #5 still exists. To me this is a normal bug.

gaëlg’s picture

StatusFileSize
new21.42 KB

And my AJAX error was actually a segmentation fault because of a loop in function calls. I enabled XDebug and got:

La synchronisation de configuration a rencontré une erreur.
Veuillez vous référer à la page d'erreur

An AJAX HTTP error occurred.
HTTP Result Code: 200
Debugging information follows.
Path: /core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=1&op=do_nojs&op=do
StatusText: OK
ResponseText: 
( ! ) Fatal error: Maximum function nesting level of '1000' reached, aborting! in /var/www/html/localhost.dev/core/lib/Drupal/Core/Database/Query/Query.php on line 75
Call Stack
#TimeMemoryFunctionLocation
10.0001241440{main}(  )../install.php:0
20.0013457600install_drupal(  )../install.php:36
32.61826484480install_run_tasks(  )../install.core.inc:116
42.62526741064install_run_task(  )../install.core.inc:526
52.62586741456_batch_page(  )../install.core.inc:618
62.62967037392_batch_do(  )../batch.inc:77
72.62967037704_batch_process(  )../batch.inc:95
82.63057157616call_user_func_array
(  )../batch.inc:252
92.63057157704config_install_batch_process(  )../batch.inc:252
102.63057157760Drupal\Core\Config\ConfigImporter->doSyncStep(  )../config_installer.profile:129
112.63057158064Drupal\Core\Config\ConfigImporter->processConfigurations(  )../ConfigImporter.php:492
122.63207160568Drupal\Core\Config\ConfigImporter->processConfiguration(  )../ConfigImporter.php:586
132.63207161080Drupal\Core\Config\ConfigImporter->importInvokeOwner(  )../ConfigImporter.php:758
142.63897980312Drupal\Core\Config\Entity\ConfigEntityStorage->importCreate(  )../ConfigImporter.php:976
152.65898071144Drupal\Core\Config\Entity\ConfigEntityBase->save(  )../ConfigEntityStorage.php:392
162.65898071224Drupal\Core\Entity\Entity->save(  )../ConfigEntityBase.php:612
172.65908071480Drupal\Core\Config\Entity\ConfigEntityStorage->save(  )../Entity.php:368
182.65908071592Drupal\Core\Entity\EntityStorageBase->save(  )../ConfigEntityStorage.php:264
192.73559699776Drupal\Core\Entity\EntityStorageBase->doPostSave(  )../EntityStorageBase.php:400
202.73559700240Drupal\language\Entity\ConfigurableLanguage->postSave(  )../EntityStorageBase.php:474
212.75079739496language_negotiation_url_prefixes_update(  )../ConfigurableLanguage.php:136
222.75179744536Drupal\language\ConfigurableLanguageManager->getLanguages(  )../language.module:286


232.75379751024Drupal\Core\Language\Language::sort(  )../ConfigurableLanguageManager.php:319
242.75379751432uasort
(  )../Language.php:157
252.75379751560Drupal\Core\Language\Language::Drupal\Core\Language\{closure}(  )../Language.php:157
262.75379751640strnatcasecmp
(  )../Language.php:154
272.75379751824Drupal\Core\StringTranslation\TranslatableMarkup->__toString(  )../Language.php:154
282.75379751968Drupal\Core\StringTranslation\TranslatableMarkup->render(  )../ToStringTrait.php:20
292.75379752080Drupal\Core\StringTranslation\TranslationManager->translateString(  )../TranslatableMarkup.php:204
302.75379752224Drupal\Core\StringTranslation\TranslationManager->doTranslate(  )../TranslationManager.php:119
312.75379752784Drupal\Core\StringTranslation\TranslationManager->getStringTranslation(  )../TranslationManager.php:147
322.75389754048Drupal\locale\LocaleTranslation->getStringTranslation(  )../TranslationManager.php:99
332.75409767672Drupal\Core\Cache\CacheCollector->get(  )../LocaleTranslation.php:123
342.75449788040Drupal\locale\LocaleLookup->resolveCacheMiss(  )../CacheCollector.php:153
352.78329821016Drupal\language\ConfigurableLanguageManager->getFallbackCandidates(  )../LocaleLookup.php:163
362.78329821016Drupal\language\ConfigurableLanguageManager->isMultilingual(  )../ConfigurableLanguageManager.php:372
372.78339821064Drupal\language\ConfigurableLanguageManager->getLanguages(  )../ConfigurableLanguageManager.php:149

THEN IT LOOPS AGAIN INFINITELY:

382.78359823976Drupal\Core\Language\Language::sort(  )../ConfigurableLanguageManager.php:319
392.78359824384uasort
(  )../Language.php:157

...

I get the same error with and without the #5 patch. Here's my new conf, after I corrected the core.extension.yml as mentioned in #7

gaëlg’s picture

alexpott’s picture

Status: Active » Needs review

Found another bug that cause this same message.

alexpott’s picture

StatusFileSize
new1.55 KB
casey’s picture

Nice, I can confirm that patch of #12 works in my case.

casey’s picture

Status: Needs review » Reviewed & tested by the community

When I install a site with dutch locale

drush si config_installer --locale=nl

Without patch:

Argument 1 passed to Drupal\language\LanguageNegotiator::updateConfiguration() must be of the type array, null given, called in /###/core/modules/language/language.module on line 320 and defined LanguageNegotiator.php:297 [notice]
in_array() expects parameter 2 to be array, null given LanguageNegotiator.php:310 [warning]
in_array() expects parameter 2 to be array, null given LanguageNegotiator.php:310 [warning]
in_array() expects parameter 2 to be array, null given LanguageNegotiator.php:310 [warning]
Undefined index: configurable ConfigurableLanguageManager.php:157 [notice]
exception 'Drupal\Core\Config\Schema\SchemaIncompleteException' with message 'Incomplete or missing schema for language.entity.nl' in /###/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php:279 [error]
Stack trace:
#0 /###/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(312): Drupal\Core\Config\Entity\ConfigEntityBase->toArray()
#1 /###/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(284): Drupal\Core\Config\Entity\ConfigEntityStorage->mapToStorageRecord(Object(Drupal\language\Entity\ConfigurableLanguage))
#2 /###/core/lib/Drupal/Core/Entity/EntityStorageBase.php(397): Drupal\Core\Config\Entity\ConfigEntityStorage->doSave('nl', Object(Drupal\language\Entity\ConfigurableLanguage))
#3 /###/core/lib/Drupal/Core/Config/Entity/ConfigEntityStorage.php(264): Drupal\Core\Entity\EntityStorageBase->save(Object(Drupal\language\Entity\ConfigurableLanguage))
#4 /###/core/lib/Drupal/Core/Entity/Entity.php(368): Drupal\Core\Config\Entity\ConfigEntityStorage->save(Object(Drupal\language\Entity\ConfigurableLanguage))
#5 /###/core/lib/Drupal/Core/Config/Entity/ConfigEntityBase.php(612): Drupal\Core\Entity\Entity->save()
#6 /###/core/includes/install.core.inc(1592): Drupal\Core\Config\Entity\ConfigEntityBase->save()
#7 /###/core/includes/install.core.inc(1637): install_download_additional_translations_operations(Array)
#8 /###/core/includes/install.core.inc(577): install_import_translations(Array)
#9 /###/core/includes/install.core.inc(526): install_run_task(Array, Array)
#10 /###/core/includes/install.core.inc(116): install_run_tasks(Array)
#11 /###/vendor/drush/drush/includes/drush.inc(721): install_drupal(Object(Composer\Autoload\ClassLoader), Array)
#12 /###/vendor/drush/drush/includes/drush.inc(706): drush_call_user_func_array('install_drupal', Array)
#13 /###/vendor/drush/drush/commands/core/drupal/site_install.inc(78): drush_op('install_drupal', Object(Composer\Autoload\ClassLoader),
Array)
#14 /###/vendor/drush/drush/commands/core/site_install.drush.inc(289):
drush_core_site_install_version('config_installe...', Array)
#15 [internal function]: drush_core_site_install('config_installe...')
#16 /###/vendor/drush/drush/includes/command.inc(364): call_user_func_array('drush_core_site...', Array)
#17 /###/vendor/drush/drush/includes/command.inc(215): _drush_invoke_hooks(Array, Array)
#18 [internal function]: drush_command('config_installe...')
#19 /###/vendor/drush/drush/includes/command.inc(183): call_user_func_array('drush_command', Array)
#20 /###/vendor/drush/drush/lib/Drush/Boot/BaseBoot.php(65): drush_dispatch(Array)
#21 /###/vendor/drush/drush/includes/preflight.inc(64): Drush\Boot\BaseBoot->bootstrap_and_dispatch()
#22 /###/vendor/drush/drush/drush.php(12): drush_main()
#23 {main}

With patch:
Success!

alexpott’s picture

StatusFileSize
new18.3 KB

I've been trying to get a test I've written for the past couple of days... finally made one that works :)

Unfortunately d.o does not support profile testing.

alexpott’s picture

Sample test run given d.o does not do this for us.

sudo -u _www php ./core/scripts/run-tests.sh --verbose --color --non-html --url http://drupal8.dev --verbose --class 'Drupal\config_installer\Tests\ConfigInstallerFrTarballTest'

Drupal test run
---------------

Tests to be run:
  - Drupal\config_installer\Tests\ConfigInstallerFrTarballTest

Test run started:
  Wednesday, December 23, 2015 - 13:26

Test summary
------------

Drupal\config_installer\Tests\ConfigInstallerFrTarballTest    35 passes                           16 messages

Test run duration: 25 sec

Detailed test results
---------------------


---- Drupal\config_installer\Tests\ConfigInstallerFrTarballTest ----


Status    Group      Filename          Line Function
--------------------------------------------------------------------------------
Pass      Browser    InstallerTestBase  121 Drupal\simpletest\InstallerTestBase
    GET http://drupal8.dev/core/install.php returned 200 (14.63 KB).
Pass      Browser    InstallerTestBase  121 Drupal\simpletest\InstallerTestBase
    Valid HTML found on "http://drupal8.dev/core/install.php"
Pass      Browser    InstallerTestBase  174 Drupal\simpletest\InstallerTestBase
    GET http://drupal8.dev/core/install.php?rewrite=ok&langcode=en returned 200
    (14.61 KB).
Pass      Browser    InstallerTestBase  174 Drupal\simpletest\InstallerTestBase
    Valid HTML found on
    "http://drupal8.dev/core/install.php?rewrite=ok&langcode=en"
Pass      Browser    InstallerTestBase  184 Drupal\simpletest\InstallerTestBase
    GET
    http://drupal8.dev/core/install.php?rewrite=ok&langcode=en&profile=config_installer
    returned 200 (21.48 KB).
Pass      Browser    InstallerTestBase  184 Drupal\simpletest\InstallerTestBase
    Valid HTML found on
    "http://drupal8.dev/core/install.php?rewrite=ok&langcode=en&profile=config_installer"
Pass      Browser    InstallerTestBase  192 Drupal\simpletest\InstallerTestBase
    POST
    http://drupal8.dev/core/install.php?rewrite=ok&langcode=en&profile=config_installer
    returned 200 (10.95 KB).
Pass      Browser    InstallerTestBase  192 Drupal\simpletest\InstallerTestBase
    Valid HTML found on
    "http://drupal8.dev/core/install.php?rewrite=ok&langcode=en&profile=config_installer"
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    GET
    http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=1&op=start
    returned 200 (11.42 KB).
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    Valid HTML found on
    "http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=1&op=start"
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    GET
    http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=1&op=do_nojs
    returned 200 (11.48 KB).
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    Valid HTML found on
    "http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=1&op=do_nojs"
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    GET
    http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=1&op=do_nojs
    returned 200 (11.48 KB).
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    Valid HTML found on
    "http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=1&op=do_nojs"
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    GET
    http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=1&op=do_nojs
    returned 200 (11.48 KB).
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    Valid HTML found on
    "http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=1&op=do_nojs"
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    GET
    http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=1&op=do_nojs
    returned 200 (11.49 KB).
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    Valid HTML found on
    "http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=1&op=do_nojs"
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    GET
    http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=1&op=do_nojs
    returned 200 (11.49 KB).
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    Valid HTML found on
    "http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=1&op=do_nojs"
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    GET
    http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=2&op=start
    returned 200 (11.79 KB).
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    Valid HTML found on
    "http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=2&op=start"
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    GET
    http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=2&op=do_nojs
    returned 200 (11.77 KB).
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    Valid HTML found on
    "http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=2&op=do_nojs"
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    GET
    http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer
    returned 200 (14.87 KB).
Pass      Browser    ConfigInstallerFr   29 Drupal\config_installer\Tests\Confi
    Valid HTML found on
    "http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer"
Pass      Browser    ConfigInstallerTe  114 Drupal\config_installer\Tests\Confi
    GET
    http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=3&op=start
    returned 200 (11.96 KB).
Pass      Browser    ConfigInstallerTe  114 Drupal\config_installer\Tests\Confi
    Valid HTML found on
    "http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=3&op=start"
Pass      Browser    ConfigInstallerTe  114 Drupal\config_installer\Tests\Confi
    GET
    http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=3&op=do_nojs
    returned 200 (11.95 KB).
Pass      Browser    ConfigInstallerTe  114 Drupal\config_installer\Tests\Confi
    Valid HTML found on
    "http://drupal8.dev/core/install.php?rewrite=ok&langcode=fr&profile=config_installer&id=3&op=do_nojs"
Pass      Browser    ConfigInstallerTe  114 Drupal\config_installer\Tests\Confi
    GET http://drupal8.dev/user/1 returned 200 (3.86 KB).
Pass      Browser    ConfigInstallerTe  114 Drupal\config_installer\Tests\Confi
    Valid HTML found on "http://drupal8.dev/user/1"
Pass      Other      ConfigInstallerFr   40 Drupal\config_installer\Tests\Confi
    Raw "Congratulations, you installed Drupal fr!" found
Pass      Other      ConfigInstallerFr   43 Drupal\config_installer\Tests\Confi
    Value 'fr' is equal to value 'fr'.
Pass      Other      ConfigInstallerFr   44 Drupal\config_installer\Tests\Confi
    Value false is FALSE.
alexpott’s picture

Full test run:

Drupal test run
---------------

Tests to be run:
  - Drupal\config_installer\Tests\ConfigInstallerFrTarballTest
  - Drupal\config_installer\Tests\ConfigInstallerSyncTest
  - Drupal\config_installer\Tests\ConfigInstallerTarballTest

Test run started:
  Wednesday, December 23, 2015 - 13:28

Test summary
------------

Drupal\config_installer\Tests\ConfigInstallerFrTarballTest    35 passes                           16 messages
Drupal\config_installer\Tests\ConfigInstallerSyncTest         32 passes                           11 messages
Drupal\config_installer\Tests\ConfigInstallerTarballTest      31 passes                           12 messages
alexpott’s picture

Status: Reviewed & tested by the community » Fixed

Committed...

  • alexpott committed 5e23c37 on 8.x-1.x
    Issue #2623878 by alexpott, GaëlG, casey: The "configurable_language"...
casey’s picture

Thank you for the quick resolution!

Status: Fixed » Closed (fixed)

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

quindio’s picture

I do not know if this is the same problem but from time to time I get a similar error
This time I typed "drush updb"

Drupal\Component\Plugin\Exception\PluginNotFoundException: The       [error]
"pubfactsheets" entity type does not exist. in
Drupal\Core\Entity\EntityTypeManager->getDefinition() (line 125 of
/usr/share/nginx/html/drupal/core/lib/Drupal/Core/Entity/EntityTypeManager.php).

I do a "drush cache-clear drush", "drush up" then "drush cr" and the mesage goes
away for a while.

I have gotten that message several times since I updated to D8.1.7

Do I need to open a new bug? since this is closed.

gaëlg’s picture

@quindio your problem is with "pubfactsheets" so it's unrelated. Make sure it's a bug in Drupal code (core or contrib module) and if it is, try to find an existing issue about it or open a new one if none exist.

damienmckenna’s picture

FYI you can hit this error if you're running the patches from #2788777: Allow a site-specific profile to be installed from existing config with exported configuration and the installation profile runs standard_install(), so make sure not to run standard_install() when exporting the configuration :)