Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
aggregator.module_1.diff | 2.72 KB | drumm | |
Comments
Comment #1
Dries CreditAttribution: Dries commentedI'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.)Comment #2
andremolnar CreditAttribution: andremolnar commentedBlock.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
Comment #3
drummThese 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.
Comment #4
Dries CreditAttribution: Dries commentedCommitted to HEAD.
Comment #5
(not verified) CreditAttribution: commented