diff --git a/core/lib/Drupal/Core/Field/ConfigEntityReferenceItemBase.php b/core/lib/Drupal/Core/Field/ConfigEntityReferenceItemBase.php index 7921521..2934917 100644 --- a/core/lib/Drupal/Core/Field/ConfigEntityReferenceItemBase.php +++ b/core/lib/Drupal/Core/Field/ConfigEntityReferenceItemBase.php @@ -94,7 +94,7 @@ public static function schema(FieldInterface $field) { public function isEmpty() { // Avoid loading the entity by first checking the 'target_id'. $target_id = $this->target_id; - if (isset($target_id)) { + if ($target_id !== NULL && $target_id !== '') { return FALSE; } // Allow auto-create entities. diff --git a/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php b/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php index c120377..04d3191 100644 --- a/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/FieldAttachOtherTest.php @@ -269,7 +269,7 @@ function testFieldAttachCache() { $entity = clone($entity_init); $entity->{$this->field_name_2} = $values; $entity->save(); - $cid = "entity:$entity_type:" . $entity->id(); + $cid = "values:$entity_type:" . $entity->id(); $this->assertFalse(cache('field')->get($cid), 'Cached: no cache entry on insert'); // Load, and check that a cache entry is present with the expected values. diff --git a/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php b/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php index d24042a..9751712 100644 --- a/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php +++ b/core/modules/filter/lib/Drupal/filter/Tests/FilterSecurityTest.php @@ -82,6 +82,7 @@ function testDisableFilterModule() { 'filters[filter_test_replace][status]' => 1, ); $this->drupalPostForm('admin/config/content/formats/manage/' . $format_id, $edit, t('Save configuration')); + \Drupal::entityManager()->getStorageController('node')->resetCache(array($node->id())); // Verify that filter_test_replace filter replaced the content. $this->drupalGet('node/' . $node->id()); diff --git a/core/modules/text/lib/Drupal/text/Tests/TextWithSummaryItemTest.php b/core/modules/text/lib/Drupal/text/Tests/TextWithSummaryItemTest.php index ca8150e..43e26f8 100644 --- a/core/modules/text/lib/Drupal/text/Tests/TextWithSummaryItemTest.php +++ b/core/modules/text/lib/Drupal/text/Tests/TextWithSummaryItemTest.php @@ -126,7 +126,7 @@ function testProcessedCache() { // Load the entity and check that the field cache contains the expected // data. $entity = entity_load($entity_type, $entity->id()); - $cache = cache('entity')->get("entity:$entity_type:" . $entity->id()); + $cache = cache('entity')->get("values:$entity_type:" . $entity->id()); $this->assertEqual($cache->data['values']['summary_field'], array( Language::LANGCODE_DEFAULT => array( 0 => array( @@ -154,7 +154,7 @@ function testProcessedCache() { ), ); \Drupal::entityManager()->getStorageController($entity_type)->resetCache(); - cache('entity')->set("entity:$entity_type:" . $entity->id(), $data); + cache('entity')->set("values:$entity_type:" . $entity->id(), $data); $entity = entity_load($entity_type, $entity->id()); $this->assertEqual($entity->summary_field->processed, 'Cached processed value'); $this->assertEqual($entity->summary_field->summary_processed, 'Cached summary processed value');