You shouldn't call drupal_render() on the block content, it makes it difficult to alter the content via hook_block_view_alter(). As a side effect this also fixes #1883884: Undefined index notice in comment_block_block_view().

Comments

SolomonGifford’s picture

Issue summary: View changes
Status: Active » Needs work

I think this patch was missing an admin file? can you reroll against master?

mstrelan’s picture

I don't think the hook_menu implementation is meant to be in the patch. Really just from function comment_block_node_view_alter(&$build) { to the end.

SolomonGifford’s picture

If so, how are the following being set:

variable_get('comment_block_view_modes');
variable_get('comment_block_node_types');

mstrelan’s picture

Well I can barely remember creating this issue, but on closer look I think I uploaded the wrong patch entirely, especially considering the filename references #1722726: Add view_mode and node type options for where blocks appear and check for comments. The patch most likely would have simply been to remove drupal_render() from comment_block_block_view().

SolomonGifford’s picture

Status: Needs work » Closed (fixed)

Aha. Ok, mystery solved. Fix made, tested and pushed.