Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
added 79 characters in body
Source Link
user2750995
  • 193
  • 2
  • 11

I am trying to generate html output of whole page and then pass it to response array.I am doing something like this:

  $page = array(
  '#theme' => 'html',
  '#page_object' => new HtmlPage(render($content)),
   );

$content is a render array and new HtmlPage creates a HtmlPage object from an existing page. I am passing render($page) to the response object, but I am getting error this error:

LogicException: A stray drupal_render() invocation with $is_root_call = TRUE is causing bubbling of attached assets to break. in Drupal\Core\Render\Renderer->doRender() (line 377 of core\lib\Drupal\Core\Render\Renderer.php).

What should I do to make this correct? Thanks

I am trying to generate html output of whole page and then pass it to response array.I am doing something like this:

  $page = array(
  '#theme' => 'html',
  '#page_object' => render($content),
   );

$content is a render array. I am passing render($page) to the response object, but I am getting error this error:

LogicException: A stray drupal_render() invocation with $is_root_call = TRUE is causing bubbling of attached assets to break. in Drupal\Core\Render\Renderer->doRender() (line 377 of core\lib\Drupal\Core\Render\Renderer.php).

What should I do to make this correct? Thanks

I am trying to generate html output of whole page and then pass it to response array.I am doing something like this:

  $page = array(
  '#theme' => 'html',
  '#page_object' => new HtmlPage(render($content)),
   );

$content is a render array and new HtmlPage creates a HtmlPage object from an existing page. I am passing render($page) to the response object, but I am getting error this error:

LogicException: A stray drupal_render() invocation with $is_root_call = TRUE is causing bubbling of attached assets to break. in Drupal\Core\Render\Renderer->doRender() (line 377 of core\lib\Drupal\Core\Render\Renderer.php).

What should I do to make this correct? Thanks

deleted 54 characters in body
Source Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284

I am trying to generate html output of whole page and then pass it to response array.I am doing something like this: $page = array( '#theme' => 'html', '#page_object' => render($content), );

  $page = array(
  '#theme' => 'html',
  '#page_object' => render($content),
   );

here $content$content is a render array representing themed output of content.And then I am finally passing this render($page) to Responsethe response object. But, but I am getting error this error:

LogicException: A stray drupal_render()drupal_render() invocation with $is_root_call = TRUE$is_root_call = TRUE is causing bubbling of attached assets to break. in Drupal\Core\Render\Renderer->doRender()Drupal\Core\Render\Renderer->doRender() (line 377 of core\lib\Drupal\Core\Render\Renderer.php).

What should I do to make this correct? Thanks

I am trying to generate html output of whole page and then pass it to response array.I am doing something like this: $page = array( '#theme' => 'html', '#page_object' => render($content), );

here $content is a render array representing themed output of content.And then I am finally passing this render($page) to Response object. But I am getting error this error:

LogicException: A stray drupal_render() invocation with $is_root_call = TRUE is causing bubbling of attached assets to break. in Drupal\Core\Render\Renderer->doRender() (line 377 of core\lib\Drupal\Core\Render\Renderer.php).

What should I do to make this correct? Thanks

I am trying to generate html output of whole page and then pass it to response array.I am doing something like this:

  $page = array(
  '#theme' => 'html',
  '#page_object' => render($content),
   );

$content is a render array. I am passing render($page) to the response object, but I am getting error this error:

LogicException: A stray drupal_render() invocation with $is_root_call = TRUE is causing bubbling of attached assets to break. in Drupal\Core\Render\Renderer->doRender() (line 377 of core\lib\Drupal\Core\Render\Renderer.php).

What should I do to make this correct? Thanks

edited tags
Link
avpaderno
  • 97.9k
  • 15
  • 164
  • 284
Source Link
user2750995
  • 193
  • 2
  • 11
Loading