I deleted the Maps and Directions Block because we don't have a physical address for our ministry and when I did the following error popped up on my front page:

Notice: Trying to get property of non-object in block_block_view() (line 245 of /home1/revivefe/public_html/modules/block/block.module).
Notice: Trying to get property of non-object in block_block_view() (line 245 of /home1/revivefe/public_html/modules/block/block.module).
Notice: Trying to get property of non-object in block_block_view() (line 245 of /home1/revivefe/public_html/modules/block/block.module).
Notice: Trying to get property of non-object in block_block_view() (line 245 of /home1/revivefe/public_html/modules/block/block.module).

Any ideas?

Comments

Code Monkey’s picture

You might be able to remove the problem by looking into the Context module.

revivefellowship’s picture

Status: Active » Fixed

Fixed.

See instructions in this thread. Apparently Open Church theme does not like me deleting stuff.

http://drupal.org/node/1128936

drupalninja99’s picture

Status: Fixed » Needs work

So the issue is if you delete the maps block you get an error? I want to look into this and see what the root cause is.

revivefellowship’s picture

Sorry for delay in giving you feedback on this one.

Yes that appears to be the issue. Anytime you delete any of the custom blocks that appear on the front page, it will create an error in the database because the front page is still trying to reference a block that no longer exists anymore.

Code Monkey’s picture

I think it is related to the Context module. If you remove the block from the context prior to deleting the block, would this still occur?

drupalninja99’s picture

Priority: Normal » Major

Going to up the priority

drupalninja99’s picture

Priority: Major » Normal

OK I understand what you are saying. This isn't really a bug per-se. Like CodeMonkey is saying if you delete a block you will need to edit the context and remove the refence to it here:
/admin/structure/context/list/openchurch-all-sitewide/edit

The better thing to have done would have been just to edit that block and reuse it for something else. But since you have already deleted it you can just remove the reference to it on the context edit page.

Does that make sense?

drupalninja99’s picture

Status: Needs work » Closed (works as designed)