diff --git a/core/modules/views/lib/Drupal/views/Tests/ViewsBaseThemeTest.php b/core/modules/views/lib/Drupal/views/Tests/ViewsBaseThemeTest.php new file mode 100644 index 0000000..3fa6633 --- /dev/null +++ b/core/modules/views/lib/Drupal/views/Tests/ViewsBaseThemeTest.php @@ -0,0 +1,59 @@ + 'Views base theme test', + 'description' => 'Tests the Views theme integration.', + 'group' => 'Views theming', + ); + } + + /** + * {@inheritdoc} + */ + protected function setUp() { + parent::setUp(); + } + + /** + * Tests for exceptions. + */ + public function testFrontPage() { + theme_enable(array('test_basetheme')); + \Drupal::config('system.theme') + ->set('default', 'test_basesubtheme') + ->save(); + $this->drupalGet(''); + $this->assertTrue(FALSE, "Testing"); + } + + public function testFrontPageSubTheme() { + theme_enable(array('test_basetheme', 'test_subtheme')); + \Drupal::config('system.theme') + ->set('default', 'test_subtheme') + ->save(); + $this->drupalGet(''); + $this->assertTrue(FALSE, "Testing"); + } + +} diff --git a/core/modules/views/lib/Drupal/views/ViewExecutable.php b/core/modules/views/lib/Drupal/views/ViewExecutable.php index c9b097a..0451544 100644 --- a/core/modules/views/lib/Drupal/views/ViewExecutable.php +++ b/core/modules/views/lib/Drupal/views/ViewExecutable.php @@ -1360,7 +1360,7 @@ class ViewExecutable { // Let the themes play too, because pre render is a very themey thing. if (isset($GLOBALS['base_theme_info']) && isset($GLOBALS['theme'])) { foreach ($GLOBALS['base_theme_info'] as $base) { - $module_handler->invoke($base, 'views_pre_render', array($this)); + $module_handler->invoke($base->name, 'views_pre_render', array($this)); } $module_handler->invoke($GLOBALS['theme'], 'views_pre_render', array($this)); @@ -1384,7 +1384,7 @@ class ViewExecutable { // Let the themes play too, because post render is a very themey thing. if (isset($GLOBALS['base_theme_info']) && isset($GLOBALS['theme'])) { foreach ($GLOBALS['base_theme_info'] as $base) { - $module_handler->invoke($base, 'views_post_render', array($this)); + $module_handler->invoke($base->name, 'views_post_render', array($this)); } $module_handler->invoke($GLOBALS['theme'], 'views_post_render', array($this));