The context module's block reaction uses the theme function from the block module to theme blocks, which can work even if the block module is turned off. However, in that case even though block module is disabled, the file block.module is still loaded (automatically by theme.inc) because it contains the theme function.
Now over to webform module - the function webform_node_insert() checks if function_exists('block_flush_caches') and if so, calls that function. That function in turn expects the block table to exist in the database. In the case that block module has never been enabled on a site, and block reaction is used by context, and the webform being inserted is available as a block, if (function_exists('block_flush_caches')) will return true since the file is loaded, even though the block table doesn't exist, and block_flush_caches() will be called, which will result in a fatal error.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | webform-block_error-3005185-5.patch | 328 bytes | goron |
Comments
Comment #2
goron commentedComment #3
goron commentedComment #4
goron commentedComment #5
goron commentedI think this should work to fix it, unless I'm missing some reason that this wasn't used in the first place. Just changes
function_exists('block_flush_caches')tomodule_exists('block')Comment #6
liam morlandComment #7
liam morlandComment #9
liam morlandThanks!