diff -u b/core/modules/field/field.module b/core/modules/field/field.module --- b/core/modules/field/field.module +++ b/core/modules/field/field.module @@ -445,7 +445,7 @@ * The function takes care of invoking the prepare_view steps. It also respects * field access permissions. * - * @param \Drupal\Core\Entity\EntityInterface $entity + * @param \Drupal\Core\Entity\ContentEntityInterface $entity * The entity containing the field to display. * @param $field_name * The name of the field to display. @@ -471,7 +471,7 @@ * The function takes care of invoking the prepare_view steps. It also respects * field access permissions. * - * @param \Drupal\Core\Entity\ContentEntityInterface $entity + * @param \Drupal\Core\Entity\EntityInterface $entity * The entity containing the field to display. * @param $field_name * The name of the field to display. diff -u b/core/modules/node/lib/Drupal/node/NodeTitleItemList.php b/core/modules/node/lib/Drupal/node/NodeTitleItemList.php --- b/core/modules/node/lib/Drupal/node/NodeTitleItemList.php +++ b/core/modules/node/lib/Drupal/node/NodeTitleItemList.php @@ -7,6 +7,7 @@ namespace Drupal\node; +use Drupal\Core\Field\FieldDefinition; use Drupal\Core\Field\FieldItemList; /** @@ -18,11 +19,14 @@ /** * {@inheritdoc} + * + * The typehint for $definition is a class rather than an interface, because + * there is no interface for setFieldLabel(). */ - public function __construct(array $definition, $name, NodeInterface $node) { + public function __construct(FieldDefinition $definition, $name, NodeInterface $node) { $node_type = node_type_load($node->getType()); if (isset($node_type->title_label)) { - $definition['label'] = $node_type->title_label; + $definition->setFieldLabel($node_type->title_label); } parent::__construct($definition, $name, $node); } diff -u b/core/modules/node/node.module b/core/modules/node/node.module --- b/core/modules/node/node.module +++ b/core/modules/node/node.module @@ -205,7 +205,8 @@ } } } - // @todo Manage base field displays in the YAML. + // @todo Manage base field displays in the YAML: + // https://drupal.org/node/2144919. $display->setComponent('title', array( 'label' => 'hidden', 'type' => 'text_default', @@ -218,7 +219,8 @@ */ function node_entity_form_display_alter(EntityFormDisplay $form_display, $context) { if ($context['entity_type'] == 'node') { - // @todo Manage base field displays in the YAML. + // @todo Manage base field displays in the YAML: + // https://drupal.org/node/2144919. $node_type = node_type_load($context['bundle']); if ($node_type->has_title) { // Title is also registered in node_field_extra_fields(). reverted: --- b/core/modules/overlay/lib/Drupal/overlay/Tests/OverlayCloseTest.php +++ a/core/modules/overlay/lib/Drupal/overlay/Tests/OverlayCloseTest.php @@ -45,7 +45,7 @@ // Create a new node, with ?render=overlay in the query parameter to // simulate creating it inside the overlay. + $this->drupalPostForm('node/add/test', array('title' => 'Test node title'), t('Save'), array('query' => array('render' => 'overlay'))); - $this->drupalPostForm('node/add/test', array('title[0][value]' => 'Test node title'), t('Save'), array('query' => array('render' => 'overlay'))); // Make sure a bare minimum HTML page is displayed that contains the // JavaScript necessary to close the overlay.