diff --git a/core/modules/block/custom_block/custom_block.views.inc b/core/modules/block/custom_block/custom_block.views.inc index 3008e9a..26af18f 100644 --- a/core/modules/block/custom_block/custom_block.views.inc +++ b/core/modules/block/custom_block/custom_block.views.inc @@ -95,7 +95,7 @@ function custom_block_views_data() { ); $data['custom_block']['type'] = array(); - if (module_exists('language')) { + if (Drupal::moduleHandler()->moduleExists('language')) { $data['custom_block']['langcode'] = array( 'title' => t('Language'), 'help' => t('The language the custom block is in.'), @@ -174,6 +174,7 @@ function custom_block_views_data() { 'id' => 'standard', ), 'relationship' => array( + 'id' => 'standard', 'label' => t('Custom block'), 'base' => 'custom_block', 'base field' => 'revision_id', diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/field/EntityLink.php b/core/modules/views/lib/Drupal/views/Plugin/views/field/EntityLink.php index e5da433..75e58ed 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/field/EntityLink.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/field/EntityLink.php @@ -55,6 +55,13 @@ public function buildOptionsForm(&$form, &$form_state) { /** * {@inheritdoc} */ + public function usesGroupBy() { + return FALSE; + } + + /** + * {@inheritdoc} + */ public function render($values) { $value = $this->get_value($values); return $this->renderLink($value, $values); @@ -64,8 +71,7 @@ public function render($values) { * Render a link to an entity. */ protected function renderLink($value, $values) { - $entity = $this->get_entity($values); - if ($entity->access($this->operation)) { + if (($entity = $this->get_entity($values)) && $entity->access($this->operation)) { $this->options['alter']['make_link'] = TRUE; $this->options['alter']['path'] = $this->getEntityPath($entity);