I had a block, that was created on 'admin/structure/block/add', as reaction inside my context.
After deleting this block with cores block interface (admin/structure/block/delete). I started getting following notices.
Notice: Trying to get property of non-object in block_block_view() (regel 247 van /var/www/projects/openvld/modules/block/block.module).
Notice: Trying to get property of non-object in block_block_view() (regel 247 van /var/www/projects/openvld/modules/block/block.module).
Context still tries to load the block, because the block is still set as a reaction. After re-saving the context, the notices are gone.
Because we have a lot of contexts, it took me a while to find out what context triggered the block. (Editors can edit contexts).
In my opinion, blocks that are deleted, should also be deleted as a reaction.
Comments
Comment #1
Anonymous (not verified) commentedI'd like to add a note beyond the original issue. I have a similar Notice here in 7.x-3.0-beta2 after deleting a menu (and thus deleting the menu block used in Context).
Notice: Undefined index: menu-example in menu_block_view() (Zeile 487 von /www/htdocs/v342791/public/bambali2012/modules/menu/menu.module).Wouldn't it make sense to add a maintenance-page to this module? E.g. to automatically check all Context references and allow for a cleanup at the press of a button?