diff --git a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php index 4624459..409191a 100644 --- a/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php +++ b/core/lib/Drupal/Core/Entity/ContentEntityDatabaseStorage.php @@ -221,10 +221,7 @@ protected function initTableLayout() { $this->revisionTable = $this->entityType->getRevisionTable() ?: $this->entityTypeId . '_revision'; } - // @todo Remove the data table check once all entity types are using entity - // query. See https://drupal.org/node/2068325. - $data_table = $this->entityType->getDataTable(); - if ($data_table && ($layout_type & static::LAYOUT_MULTILINGUAL)) { + if ($layout_type & static::LAYOUT_MULTILINGUAL) { $this->dataTable = $this->entityType->getDataTable() ?: $this->entityTypeId . '_field_data'; $this->langcodeKey = $this->entityType->getKey('langcode') ?: 'langcode'; $this->defaultLangcodeKey = $this->entityType->getKey('default_langcode') ?: 'default_langcode'; @@ -252,7 +249,10 @@ protected function getLayoutType() { if ($this->entityType->hasKey('revision')) { $this->layoutType |= static::LAYOUT_REVISION; } - if ($this->entityType->isTranslatable()) { + // @todo Remove the data table check once all entity types are using entity + // query. See https://drupal.org/node/2068325. + $data_table = $this->entityType->getDataTable(); + if ($data_table && $this->entityType->isTranslatable()) { $this->layoutType |= static::LAYOUT_MULTILINGUAL; } } diff --git a/core/modules/entity/entity.module b/core/modules/entity/entity.module index cb872b7..4ac08c2 100644 --- a/core/modules/entity/entity.module +++ b/core/modules/entity/entity.module @@ -114,9 +114,6 @@ function entity_modules_installed($modules) { $storage = $entity_manager->getStorage($entity_type_id); if ($storage instanceof ContentEntitySchemaHandlerInterface) { foreach ($storage->getSchema() as $table_name => $table_schema) { - // Some test entity types share the same schema so we need a check to - // avoid attempting to create the schema more than once, which would - // result in an error. // @todo Remove the drupal_get_schema() call once all entity types // have been converted to an automatic schema. if (!drupal_get_schema($table_name) && !$schema->tableExists($table_name)) {