Problem/Motivation

If you have config translation yml files (for example translation of some field label etc.) in folder config/sync/language/<langcode>/, you would get errors about not existing field like

[Drupal\Core\Field\FieldException]
Attempt to create a field field_name that does not exist on entity type paragraph.

Steps to reproduce:

  1. Install pure drupal 8 with minimal install profile.
  2. Install default_content, config_translation modules.
  3. Add some language.
  4. Add some content type or bundle of some entity type.
  5. Add translation of some field configuration (translate label etc).
  6. Add some some entities.
  7. Create and enable custom module with exported by default_content.
  8. Run drush cex -y.
  9. Run drush site-install --db-url=mysql://someuser:somepass@localhost/somedatabase --account-pass=admin --existing-config -y -vvv.

Proposed resolution

Patch from this issue:
https://www.drupal.org/project/drupal/issues/2955457#comment-12896738

Comments

Chewie created an issue. See original summary.

Chewie’s picture

Issue summary: View changes
sarci’s picture

I'm experiencing the same issue. What kind of solution could be used to solve the problem?

pfrenssen’s picture

I have not looked into this but initial starting points in investigating this could be:

  1. Check that the config dependencies are correct, possibly a dependency is missing causing the field to be created too early.
  2. Check if this is possibly related to #2922417: Profile provided configuration entities can have unmeetable dependencies.
Chewie’s picture

I have added patch which could be related to current issue:
https://www.drupal.org/project/drupal/issues/2955457#comment-12896738

Chewie’s picture

Chewie’s picture

@pfrenssen I did recheck.
1. So dependencies is correct in active storage configs.
2. Tried patch from issue https://www.drupal.org/project/drupal/issues/2922417. It also doesn't help.

Chewie’s picture

Issue summary: View changes
Status: Active » Needs review
pfrenssen’s picture

Let's try if this is possibly fixed by the patch from #2999061: Non interactive install with configuration overrides is broken. In that patch a fix is included that will rebuild the container during a non-interactive installation which is the installation type used for doing an install from config with Drush.

I have a feeling that this might solve the problem.

larowlan’s picture

Status: Needs review » Postponed (maintainer needs more info)

Not sure what we're reviewing here? OP links to patch on an issue elsewhere