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().
| Comment | File | Size | Author |
|---|---|---|---|
| 1722726-comment_block-view_modes-content_types.patch | 1.54 KB | mstrelan |
Comments
Comment #1
SolomonGifford commentedI think this patch was missing an admin file? can you reroll against master?
Comment #2
mstrelan commentedI 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.Comment #3
SolomonGifford commentedIf so, how are the following being set:
variable_get('comment_block_view_modes');
variable_get('comment_block_node_types');
Comment #4
mstrelan commentedWell 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().
Comment #5
SolomonGifford commentedAha. Ok, mystery solved. Fix made, tested and pushed.