From a16fffe043bdaade7301b1e53a1e7a65c7ca8768 Mon Sep 17 00:00:00 2001
From: markcarver <markcarver@501638.no-reply.drupal.org>
Date: Fri, 24 Jun 2016 03:28:43 -0500
Subject: [PATCH] Issue #2754929 by markcarver: Internal path(s) missing for
 "html" and "page" theme hook suggestions on <front>

---
 core/modules/system/system.module | 14 ++------------
 1 file changed, 2 insertions(+), 12 deletions(-)

diff --git a/core/modules/system/system.module b/core/modules/system/system.module
index 738b52e..bfae5ac 100644
--- a/core/modules/system/system.module
+++ b/core/modules/system/system.module
@@ -251,12 +251,7 @@ function system_hook_info() {
  * Implements hook_theme_suggestions_HOOK().
  */
 function system_theme_suggestions_html(array $variables) {
-  if (\Drupal::service('path.matcher')->isFrontPage()) {
-    $path_args = [''];
-  }
-  else {
-    $path_args = explode('/', ltrim(\Drupal::service('path.current')->getPath(), '/'));
-  }
+  $path_args = explode('/', ltrim(\Drupal::service('path.current')->getPath(), '/'));
   return theme_get_suggestions($path_args, 'html');
 }
 
@@ -264,12 +259,7 @@ function system_theme_suggestions_html(array $variables) {
  * Implements hook_theme_suggestions_HOOK().
  */
 function system_theme_suggestions_page(array $variables) {
-  if (\Drupal::service('path.matcher')->isFrontPage()) {
-    $path_args = [''];
-  }
-  else {
-    $path_args = explode('/', Url::fromRoute('<current>')->getInternalPath());
-  }
+  $path_args = explode('/', ltrim(\Drupal::service('path.current')->getPath(), '/'));
   return theme_get_suggestions($path_args, 'page');
 }
 
-- 
2.8.3

