diff --git a/core/lib/Drupal/Core/Entity/Entity.php b/core/lib/Drupal/Core/Entity/Entity.php index 97e3451..ec05c1a 100644 --- a/core/lib/Drupal/Core/Entity/Entity.php +++ b/core/lib/Drupal/Core/Entity/Entity.php @@ -280,7 +280,7 @@ public function access($operation = 'view', AccountInterface $account = NULL) { } return \Drupal::entityManager() ->getAccessController($this->entityType) - ->access($this, $operation, $this->language()->id, $account); + ->access($this, $operation, Language::LANGCODE_DEFAULT, $account); } /** diff --git a/core/lib/Drupal/Core/Entity/EntityNG.php b/core/lib/Drupal/Core/Entity/EntityNG.php index bbf97ff..62b5bfb 100644 --- a/core/lib/Drupal/Core/Entity/EntityNG.php +++ b/core/lib/Drupal/Core/Entity/EntityNG.php @@ -420,7 +420,7 @@ public function access($operation = 'view', AccountInterface $account = NULL) { } return \Drupal::entityManager() ->getAccessController($this->entityType) - ->access($this, $operation, $this->language()->id, $account); + ->access($this, $operation, $this->activeLangcode, $account); } /** diff --git a/core/modules/node/lib/Drupal/node/Access/NodeRevisionAccessCheck.php b/core/modules/node/lib/Drupal/node/Access/NodeRevisionAccessCheck.php index 070711e..b56359a 100644 --- a/core/modules/node/lib/Drupal/node/Access/NodeRevisionAccessCheck.php +++ b/core/modules/node/lib/Drupal/node/Access/NodeRevisionAccessCheck.php @@ -115,8 +115,8 @@ public function checkAccess(NodeInterface $node, $op = 'view', $langcode = NULL, return FALSE; } - // @todo, remove this check and the reference to $GLOBALS['user'] once - // https://drupal.org/node/2040065 is committed. + // @todo Remove this check and the reference to $GLOBALS['user'] once + // https://drupal.org/node/2040065 is committed. if (!isset($account)) { $account = $GLOBALS['user']; } diff --git a/core/modules/node/lib/Drupal/node/NodeBreadcrumbBuilder.php b/core/modules/node/lib/Drupal/node/NodeBreadcrumbBuilder.php index 196a1d0..59a9415 100644 --- a/core/modules/node/lib/Drupal/node/NodeBreadcrumbBuilder.php +++ b/core/modules/node/lib/Drupal/node/NodeBreadcrumbBuilder.php @@ -36,10 +36,10 @@ public function __construct(TranslationManager $translator) { */ public function build(array $attributes) { $trail = explode('/', $attributes['_system_path']); - $node = $attributes['node']; // Show breadcrumbs for all subpages like /edit, /delete or any other. - if (count($trail) > 2 && $trail[0] == 'node' && is_numeric($trail[1])) { + if (count($trail) > 2 && $trail[0] == 'node' && is_numeric($trail[1]) && isset($attributes['node'])) { + $node = $attributes['node']; $breadcrumb = array(); $breadcrumb[] = l($this->translator->translate('Home'), NULL); $breadcrumb[] = l($node->label(), 'node/' . $node->id());