Make a feed with the block enabled. Delete the feed. The block remains and spews a database error on every page view. This fixes that.

As for 4.5, the diff file at http://trac.civicspacelabs.com/cgi-bin/trac.cgi/changeset/273?format=diff might apply if the attached diff does not. The indentation is the only thing which might have changed in the section of code from 4.5 to CVS that I can see.

CommentFileSizeAuthor
aggregator.module_1.diff2.72 KBdrumm

Comments

dries’s picture

I'm OK with this patch but wouldn't it be better if we did not have to execute those queries for deleted/non-existing blocks? What do other modules do to prevent this kind of behavior? (_block_rehash() appears to be a private function.)

andremolnar’s picture

Block.module is required in Drupal - so _block_rehash is always available - i've often called it from a different module when doing tests and debugging (so as not to have to go to the block page to have it fire and rehash the blocks).

A little off topic, but could (or maybe should) block_rehash be moved to common.inc???

andre

drumm’s picture

These queries will go away as soon as someone saves the block position settings. I don't think we want to go into block's tables and call a "private" function from the aggregator module. This does not add queries, although we could rewrite this to remove queries, but I do not think we should for this edge case considering all the block module innards it would require using.

dries’s picture

Committed to HEAD.

Anonymous’s picture