diff --git a/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php b/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php index 4064b22..28faa5d 100644 --- a/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php +++ b/core/modules/comment/lib/Drupal/comment/Tests/CommentLanguageTest.php @@ -109,7 +109,7 @@ function testCommentLanguage() { $comment_values[$node_langcode][$langcode] = $this->randomName(); $edit = array( 'subject' => $this->randomName(), - "comment_body[$langcode][0][value]" => $comment_values[$node_langcode][$langcode], + "comment_body[und][0][value]" => $comment_values[$node_langcode][$langcode], ); $this->drupalPost($prefix . 'node/' . $node->id(), $edit, t('Preview')); $this->drupalPost(NULL, $edit, t('Save')); diff --git a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceFormatterBase.php b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceFormatterBase.php index 6d64f05..a2d8d25 100644 --- a/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceFormatterBase.php +++ b/core/modules/entity_reference/lib/Drupal/entity_reference/Plugin/field/formatter/EntityReferenceFormatterBase.php @@ -67,7 +67,7 @@ public function prepareView(array $entities_items) { if ($item->target_id !== 0) { if (!isset($target_entities[$identifier])) { // The entity no longer exists, so empty the item. - $item->setValue(); + $item->setValue(NULL); $rekey = TRUE; continue; } diff --git a/core/modules/field/lib/Drupal/field/Tests/TranslationWebTest.php b/core/modules/field/lib/Drupal/field/Tests/TranslationWebTest.php index d4b95da..e2be0de 100644 --- a/core/modules/field/lib/Drupal/field/Tests/TranslationWebTest.php +++ b/core/modules/field/lib/Drupal/field/Tests/TranslationWebTest.php @@ -116,11 +116,10 @@ function testFieldFormTranslationRevisions() { $entity->save(); // Create a new revision. - $langcode = $entity->language()->id; $edit = array( 'user_id' => 1, 'name' => $this->randomName(), - "{$field_name}[$langcode][0][value]" => $entity->{$field_name}->value, + "{$field_name}[und][0][value]" => $entity->{$field_name}->value, 'revision' => TRUE, ); $this->drupalPost($this->entity_type . '/manage/' . $entity->id() . '/edit', $edit, t('Save')); diff --git a/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php b/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php index 95c26fb..d3e37e2 100644 --- a/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php +++ b/core/modules/node/lib/Drupal/node/Tests/NodeFieldMultilingualTestCase.php @@ -72,7 +72,7 @@ function testMultilingualNodeForm() { $langcode = language_get_default_langcode('node', 'page'); $title_key = "title"; $title_value = $this->randomName(8); - $body_key = "body[$langcode][0][value]"; + $body_key = "body[und][0][value]"; $body_value = $this->randomName(16); // Create node to edit. @@ -80,7 +80,7 @@ function testMultilingualNodeForm() { $edit[$title_key] = $title_value; $edit[$body_key] = $body_value; $this->drupalPost('node/add/page', $edit, t('Save')); -// @todo fails, $edit points to 'en', form is 'und'. WTF!!! + // Check that the node exists in the database. $node = $this->drupalGetNodeByTitle($edit[$title_key]); $this->assertTrue($node, 'Node found in database.'); @@ -117,7 +117,7 @@ function testMultilingualDisplaySettings() { $langcode = language_get_default_langcode('node', 'page'); $title_key = "title"; $title_value = $this->randomName(8); - $body_key = "body[$langcode][0][value]"; + $body_key = "body[und][0][value]"; $body_value = $this->randomName(16); // Create node to edit. diff --git a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/TaxonomyFormatterBase.php b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/TaxonomyFormatterBase.php index 0cb52fc..475e4b6 100644 --- a/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/TaxonomyFormatterBase.php +++ b/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/field/formatter/TaxonomyFormatterBase.php @@ -57,7 +57,7 @@ public function prepareView(array $entities_items) { } // Otherwise, unset the instance value, since the term does not exist. else { - $item->setValue(); + $item->setValue(NULL); $rekey = TRUE; } } @@ -65,6 +65,7 @@ public function prepareView(array $entities_items) { // Rekey the items array if needed. if ($rekey) { $items->filterEmptyValues(); + debug($items->getValue()); } } }