diff --git a/core/modules/block_content/src/BlockContentViewBuilder.php b/core/modules/block_content/src/BlockContentViewBuilder.php
index ff2a853..c00d3b7 100644
--- a/core/modules/block_content/src/BlockContentViewBuilder.php
+++ b/core/modules/block_content/src/BlockContentViewBuilder.php
@@ -24,21 +24,15 @@ protected function getBuildDefaults(EntityInterface $entity, $view_mode, $langco
     // The custom block will be rendered in the wrapped block template already
     // and thus has no entity template itself.
     unset($build['#theme']);
-    return $build;
-  }
 
-  /**
-   * {@inheritdoc}
-   */
-  protected function alterBuild(array &$build, EntityInterface $entity, EntityViewDisplayInterface $display, $view_mode, $langcode = NULL) {
-    parent::alterBuild($build, $entity, $display, $view_mode, $langcode);
     // Add contextual links for this custom block.
-    if (!$entity->isNew() && $view_mode == 'full') {
+    if (!$entity->isNew()) {
       $build['#contextual_links']['block_content'] = array(
         'route_parameters' => array('block_content' => $entity->id()),
         'metadata' => array('changed' => $entity->getChangedTime()),
       );
     }
+    return $build;
   }
 
 }
diff --git a/core/modules/quickedit/quickedit.module b/core/modules/quickedit/quickedit.module
index f02fe3d..0b7eb2f 100644
--- a/core/modules/quickedit/quickedit.module
+++ b/core/modules/quickedit/quickedit.module
@@ -165,9 +165,9 @@ function quickedit_preprocess_field(&$variables) {
 }
 
 /**
- * Implements hook_entity_view_alter().
+ * Implements hook_entity_build_defaults_alter().
  */
-function quickedit_entity_view_alter(&$build, EntityInterface $entity, EntityViewDisplayInterface $display) {
+function quickedit_entity_build_defaults_alter(&$build, EntityInterface $entity) {
   $build['#attributes']['data-quickedit-entity-id'] = $entity->getEntityTypeId() . '/' . $entity->id();
 }
 
