diff --git a/core/includes/entity.inc b/core/includes/entity.inc
index 9dfb21c..c2c16af 100644
--- a/core/includes/entity.inc
+++ b/core/includes/entity.inc
@@ -549,6 +549,8 @@ function entity_view_multiple(array $entities, $view_mode, $langcode = NULL) {
  * @param $conjunction
  *   AND if all conditions in the query need to apply, OR if any of them is
  *   enough. Optional, defaults to AND.
+ *
+ * @return Drupal\Core\Entity\Query\QueryInterface
  */
 function entity_query($entity_type, $conjunction = 'AND') {
   return drupal_container()->get('entity.query')->get($entity_type, $conjunction);
diff --git a/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php b/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php
index 0abb5d9..44023ce 100644
--- a/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php
+++ b/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Query.php
@@ -69,6 +69,7 @@ public function execute() {
     $entity_tables[$base_table] = drupal_get_schema($base_table);
     $sqlQuery = $this->connection->select($base_table, 'base_table', array('conjunction' => $this->conjunction));
     $sqlQuery->addMetaData('configurable_fields', $configurable_fields);
+    $sqlQuery->addMetaData('entity_type', $entity_type);
     // Determines the key of the column to join on. This is either the entity
     // id key or the revision id key, depending on whether the entity type
     // supports revisions.
diff --git a/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Tables.php b/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Tables.php
index 068b26c..ca0d7cc 100644
--- a/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Tables.php
+++ b/core/modules/field/modules/field_sql_storage/lib/Drupal/field_sql_storage/Entity/Tables.php
@@ -129,6 +129,7 @@ protected function ensureFieldTable(&$field_name, $type, $langcode) {
       if ($field['cardinality'] != 1) {
         $this->sqlQuery->addMetaData('simple_query', FALSE);
       }
+      $this->sqlQuery->condition("$table.entity_type", $this->sqlQuery->getMetaData('entity_type'));
       $this->fieldTables[$field_name] = $this->addJoin($type, $table, "%alias.$field_id_field = base_table.$entity_id_field", $langcode);
     }
     return $this->fieldTables[$field_name];
diff --git a/core/modules/translation_entity/translation_entity.admin.inc b/core/modules/translation_entity/translation_entity.admin.inc
index d2352a5..c87a496 100644
--- a/core/modules/translation_entity/translation_entity.admin.inc
+++ b/core/modules/translation_entity/translation_entity.admin.inc
@@ -5,8 +5,6 @@
  * The entity translation administration forms.
  */
 
-use Drupal\Core\Entity\EntityFieldQuery;
-
 /**
  * Returns the confirmation form for changing field translatability.
  */
@@ -109,36 +107,61 @@ function translation_entity_translatable_switch($translatable, $field_name) {
  * Converts field data to or from LANGUAGE_NOT_SPECIFIED.
  */
 function translation_entity_translatable_batch($translatable, $field_name, &$context) {
+  $entity_types = array();
+
+  // Determine the entity types to act on.
+  foreach (field_info_instances() as $entity_type => $info) {
+    foreach ($info as $bundle => $instances) {
+      foreach ($instances as $instance_field_name => $instance) {
+        if ($instance_field_name == $field_name) {
+          $entity_types[] = $entity_type;
+          break 2;
+        }
+      }
+    }
+  }
+
   if (empty($context['sandbox'])) {
     $context['sandbox']['progress'] = 0;
+    $context['sandbox']['max'] = 0;
+
+    foreach ($entity_types as $entity_type) {
+      // How many entities will need processing?
+      $query = entity_query($entity_type);
+      $count = $query
+        ->exists($field_name)
+        ->count()
+        ->execute();
+      $context['sandbox']['max'] += $count;
+      $context['sandbox']['progress_entity_type'][$entity_type] = 0;
+      $context['sandbox']['max_entity_type'][$entity_type] = $count;
+    }
 
-    // How many entities will need processing?
-    $query = new EntityFieldQuery();
-    $count = $query
-      ->fieldCondition($field_name)
-      ->count()
-      ->execute();
-
-    if (intval($count) === 0) {
+    if ($context['sandbox']['max'] === 0) {
       // Nothing to do.
       $context['finished'] = 1;
       return;
     }
-    $context['sandbox']['max'] = $count;
   }
 
-  // Number of entities to be processed for each step.
-  $limit = 10;
-  $offset = $context['sandbox']['progress'];
-  $query = new EntityFieldQuery();
-  $result = $query
-    ->fieldCondition($field_name)
-    ->entityOrderBy('entity_id')
-    ->range($offset, $limit)
-    ->execute();
-
-  foreach ($result as $entity_type => $entities) {
-    foreach (entity_load_multiple($entity_type, array_keys($entities)) as $id => $entity) {
+  foreach ($entity_types as $entity_type) {
+    if ($context['sandbox']['max_entity_type'][$entity_type] === 0) {
+      continue;
+    }
+
+    // Number of entities to be processed for each step.
+    $info = entity_get_info($entity_type);
+    $offset = $context['sandbox']['progress_entity_type'][$entity_type];
+    $query = entity_query($entity_type);
+    $result = $query
+      ->exists($field_name)
+      ->sort($info['entity_keys']['id'])
+      ->range($offset, 10)
+      ->execute();
+
+    foreach (entity_load_multiple($entity_type, $result) as $id => $entity) {
+      $context['sandbox']['max_entity_type'][$entity_type] -= count($result);
+      $context['sandbox']['progress_entity_type'][$entity_type]++;
       $context['sandbox']['progress']++;
       $langcode = $entity->language()->langcode;
 
@@ -220,7 +243,7 @@ function translation_entity_translatable_batch_done($success, $results, $operati
   }
   else {
     // @todo: Do something about this case.
-    drupal_set_message(t("Something went wrong while processing data. Some nodes may appear to have lost fields."));
+    drupal_set_message(t("Something went wrong while processing data. Some nodes may appear to have lost fields."), 'error');
   }
 }
 
