Hi,

I have noticed the same bug in previous alpha release. Finally had some free time to debug and i have located the call that supplies invalid arguments to drupal render. I have attached the code snippet below. It's part of file quiz.pages.inc (line no 611).

The call to drupal_render($node->body) supplies an invalid array (not in the format expected by drupal_render). This result in plenty warnings like (Warning: Illegal string offset '#children' in drupal_render() ) in php 5.4.

Hope this helps to fix the issue. When i replace
return drupal_render($node->body) . drupal_render($node->content['body']);
with
return drupal_render($node->content['body']);
the warnings disappear and the quiz gets rendered as expected.

function theme_quiz_single_question_node($variables) {
  $node = $variables['question_node'];
  // This might seem meaningless, but it is designed this way to allow themes to add more
  // meaningful stuff here...
  return drupal_render($node->body) . drupal_render($node->content['body']);
}

Thanks

Comments

falcon’s picture

I'm wondering why we're using drupal_render($node->body) . drupal_render($node->content['body']) in the first place...

djdevin’s picture

Issue summary: View changes
Status: Active » Closed (outdated)