I have updated one of my D8 sites to the latest stable version - 8.3.1 using drush up. When applying the database update, the update fails with the following error message:

Failed: LogicException: Missing bundle entity, entity type block_content_type, entity id basic. in Drupal\Core\Entity\EntityType->getBundleConfigDependency() (line 882 of /var/www/sitename/core/lib/Drupal/Core/Entity/EntityType.php).

This has only happened on 1 site, so it's possibly a config issue specific to the site.

How do I manually create the missing bundle entity?

  • 2
    Sounds like you have configuration (e.g. form/view displays) that reference the non-existing basic block content type bundle. Export your configuration, search for basic and then probably delete and re-import that config.
    – Berdir
    Commented Apr 24, 2017 at 19:44
  • 1
    Yes I remember testing some form config then I uninstalled the yaml form module so it looks some config is still there. I will have a look and try the suggestion but that should work. Thank You. Commented Apr 25, 2017 at 16:53

2 Answers 2


To get passed this error I deleted some rows in the config table:

delete from config where name in ('block_content.type.basic', core.entity_view_display.block_content.basic.default', field.field.block_content.basic.body');

  • 1
    When I issued drupal module:install <module> I was getting the following error: [ERROR] Missing bundle entity, entity type media_bundle, entity id file. Basing on the answer above I deleted the related config with drupal config:delete active to continue: media.type.file
    – duru
    Commented Jan 20, 2018 at 22:39
  • 1
    The comment below is a ugly workaround.
    – jepster
    Commented Aug 2, 2018 at 8:17

When importing config files via drush updatedb the order in which config files are importer is important. For instance, node.type holds bundle information, so this should be the first config file to be imported. Also, field.storage.node must precede fields.field.node.

$import = [

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.