diff -u b/core/lib/Drupal/Core/Entity/EntityManager.php b/core/lib/Drupal/Core/Entity/EntityManager.php --- b/core/lib/Drupal/Core/Entity/EntityManager.php +++ b/core/lib/Drupal/Core/Entity/EntityManager.php @@ -491,7 +491,7 @@ } // Read from the persistent cache. Since hook_entity_extra_field_info() and - // hook_entity_extra_fields_info_alter() might contain t() calls, we cache + // hook_entity_extra_field_info_alter() might contain t() calls, we cache // per language. $langcode = $this->languageManager->getCurrentLanguage()->id; $cache_id = "entity_bundle_extra_fields:$langcode:$entity_type:$bundle"; @@ -502,7 +502,7 @@ } $extra = $this->moduleHandler->invokeAll('entity_extra_field_info'); - $this->moduleHandler->alter('entity_extra_field', $extra); + $this->moduleHandler->alter('entity_extra_field_info', $extra); $info = isset($extra[$entity_type][$bundle]) ? $extra[$entity_type][$bundle] : array(); $info += array( 'form' => array(), diff -u b/core/modules/field/tests/modules/field_test/field_test.module b/core/modules/field/tests/modules/field_test/field_test.module --- b/core/modules/field/tests/modules/field_test/field_test.module +++ b/core/modules/field/tests/modules/field_test/field_test.module @@ -194,0 +195,8 @@ + +/** + * Implements hook_entity_extra_field_info_alter(). + */ +function field_test_entity_extra_field_info_alter(&$info) { + // Remove all extra fields from the 'no_fields' content type; + unset($info['node']['no_fields']); +} diff -u b/core/modules/system/entity.api.php b/core/modules/system/entity.api.php --- b/core/modules/system/entity.api.php +++ b/core/modules/system/entity.api.php @@ -845,7 +845,7 @@ * in a #pre_render callback added by field_attach_form() and * EntityViewBuilder::viewMultiple(). * - * @see hook_entity_extra_fields_info_alter() + * @see hook_entity_extra_field_info_alter() * * @return array * A nested array of 'pseudo-field' elements. Each list is nested within the diff -u b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php --- b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php +++ b/core/tests/Drupal/Tests/Core/Entity/EntityManagerTest.php @@ -819,11 +819,11 @@ $this->moduleHandler->expects($this->once()) ->method('invokeAll') - ->with('entity_extra_fields') + ->with('entity_extra_field_info') ->will($this->returnValue($hook_bundle_extra_fields)); $this->moduleHandler->expects($this->once()) ->method('alter') - ->with('entity_extra_fields', $hook_bundle_extra_fields); + ->with('entity_extra_field_info', $hook_bundle_extra_fields); $this->cache->expects($this->once()) ->method('set')