diff --git a/core/includes/common.inc b/core/includes/common.inc index c294d9a..33a3f8b 100644 --- a/core/includes/common.inc +++ b/core/includes/common.inc @@ -493,7 +493,7 @@ function drupal_js_defaults($data = NULL) { */ function drupal_process_attached(array $elements) { $build['#attached'] = $elements['#attached']; - \Drupal::service('renderer')->renderRoot($build); + \Drupal::service('renderer')->render($build); } /** diff --git a/core/modules/system/src/Tests/Render/HtmlResponseAttachmentsTest.php b/core/modules/system/src/Tests/Render/HtmlResponseAttachmentsTest.php index abb8e23..36a6e90 100644 --- a/core/modules/system/src/Tests/Render/HtmlResponseAttachmentsTest.php +++ b/core/modules/system/src/Tests/Render/HtmlResponseAttachmentsTest.php @@ -61,7 +61,6 @@ public function testAttachments() { $this->assertHeader('X-Drupal-Cache', 'HIT'); // Now repeat all of the preceeding using drupal_process_attached(). - debug('Now using drupal_process_attached().'); // Test ['#attached']['http_header] = ['Status', $code]. $this->drupalGet('/render_attached_test/teapot_dpa'); $this->assertResponse(418); @@ -160,7 +159,7 @@ protected function assertFeed() { */ protected function assertHead() { // Discover the DOM element for the meta link. - $test_meta = $this->xpath('//head/meta[@test-attribute="testy"]'); + $test_meta = $this->xpath('//head/meta[@test-attribute="testvalue"]'); $this->assertEqual(1, count($test_meta), 'There\'s only one test attribute.'); // Grab the only DOM element. $test_meta = reset($test_meta); @@ -169,7 +168,7 @@ protected function assertHead() { } else { $test_meta_attributes = $test_meta->attributes(); - $this->assertEqual($test_meta_attributes['test-attribute'], 'testy'); + $this->assertEqual($test_meta_attributes['test-attribute'], 'testvalue'); } } diff --git a/core/modules/system/tests/modules/render_attached_test/src/Controller/TestController.php b/core/modules/system/tests/modules/render_attached_test/src/Controller/TestController.php index 3d158b3..8e71bf0 100644 --- a/core/modules/system/tests/modules/render_attached_test/src/Controller/TestController.php +++ b/core/modules/system/tests/modules/render_attached_test/src/Controller/TestController.php @@ -51,7 +51,7 @@ public function head() { [ '#tag' => 'meta', '#attributes' => [ - 'test-attribute' => 'testy', + 'test-attribute' => 'testvalue', ], ], 'test_head_attribute',