- Issue created by @Grimreaper
- 🇳🇿New Zealand quietone
Changes are made on on 11.x (our main development branch) first, and are then back ported as needed according to the Core change policies → .
- 🇫🇷France goz
I have the same issue.
I usedrush site:install minimal --existing-config
In my config, i define field for user entity. Example: field.storage.user.field_firstname.yml
This fields was created first with the ui and configured with views_display, form_display etc.If i want to reinstall site based on existing configuration, i have the issue :
[notice] Performed install task: install_import_translations In SqlContentEntityStorage.php line 815: Field field_firstname is unknown. In ContentEntityBase.php line 617: Field field_firstname is unknown.
Here is the backtrace :
SqlContentEntityStorage.php:815, Drupal\Core\Entity\Sql\SqlContentEntityStorage->save() EntityBase.php:370, Drupal\Core\Entity\EntityBase->save() SiteConfigureForm.php:305, Drupal\Core\Installer\Form\SiteConfigureForm->submitForm() FormSubmitter.php:105, call_user_func_array:{/var/www/html/web/core/lib/Drupal/Core/Form/FormSubmitter.php:105}() FormSubmitter.php:105, Drupal\Core\Form\FormSubmitter->executeSubmitHandlers() FormSubmitter.php:43, Drupal\Core\Form\FormSubmitter->doSubmitForm() FormBuilder.php:589, Drupal\Core\Form\FormBuilder->processForm() AutosaveFormBuilder.php:144, Drupal\autosave_form\Form\AutosaveFormBuilder->processForm() FormBuilder.php:495, Drupal\Core\Form\FormBuilder->submitForm() install.core.inc:977, install_get_form() install.core.inc:611, install_run_task() install.core.inc:564, install_run_tasks() install.core.inc:122, install_drupal() (...)
I doesn't seem to have the issue using UI installation.
- Merge request !12592Issue #3503157: Existing user field in configuration prevents installation... → (Open) created by goz
- 🇫🇷France goz
Digging, here is what i find :
- user 1 is first created with placeholder for username, email, password
- than config is updated, so User entity has now new fields definitions.
- When user is updated to add configured username, email and password, it's loaded from cache, which was generated before we update the field definition.
So i suggest to reset cache for the user before loading it to update datas.
- 🇫🇷France Grimreaper France 🇫🇷
Hi,
I have retested installation on Sobki with and without the proposed change, I confirm it fixes the bug.
Thanks!
- 🇬🇧United Kingdom catch
This doesn't feel like the right place to fix the problem, shouldn't this step also reset the cache?
than config is updated, so User entity has now new fields definitions.