diff --git b/core/modules/entity_ui/entity_ui.module a/core/modules/entity_ui/entity_ui.module index dc09293..a2f6b08 100644 --- b/core/modules/entity_ui/entity_ui.module +++ a/core/modules/entity_ui/entity_ui.module @@ -107,9 +107,15 @@ function view_mode_load($machine_name) { * The machine name as it was typed in a form element of type 'machine_name'. * * @param array $element - * The form element of type 'machine_name' that is being checked. + * The form element of type 'machine_name' that is being checked. The element + * is assumed to have an '#entity_type' key which denotes the entity type to + * check for an existing view mode. + * + * @return bool + * TRUE if a view mode with the given machine name already exists for the + * entity type specified in the passed-in element; FALSE otherwise. */ function entity_ui_view_mode_exists($typed_machine_name, $element) { - return entity_load('view_mode', $element['#entity_type'] . ".$typed_machine_name"); + return (bool) entity_load('view_mode', $element['#entity_type'] . ".$typed_machine_name"); } diff --git b/core/modules/system/system.install a/core/modules/system/system.install index ca9faa4..8f80ff2 100644 --- b/core/modules/system/system.install +++ a/core/modules/system/system.install @@ -2213,10 +2213,12 @@ function system_update_8034() { * * @ingroup config_upgrade */ -function system_update_8034() { - // We can't call entity_get_info() in an update hook, so we hardcode them. - // We only care about the core view modes as hook_entity_info_alter() will - // still work since that was the only way to add custom view modes in D7. +function system_update_8035() { + // We cannot call entity_get_info() in an update hook, so we hardcode the view + // modes. Only the node entity type's teaser view mode is set to custom by + // default, we check specifically for that below. The only way to add custom + // view modes in Drupal 7 was hook_entity_info_alter(), which still works in + // Drupal 8. $entity_view_modes = array( 'node' => array( 'full' => 'Full content',