Closed (fixed)
Project:
Nodeblock
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
27 Aug 2012 at 20:23 UTC
Updated:
7 Mar 2013 at 12:48 UTC
Jump to comment: Most recent file
Comments
Comment #1
David Stosik commentedActually, the code is not that wrong, as inserted block is coherent, and no big bug is provoked, as going to admin/structure/block will call _block_rehash() for your current theme.
But, I would say that current code is kind of incomplete: either no _block_rehash() should be called at all during node save, or, it should be called on all active themes (if we want to update blocks list, let's do it fully, or not at all).
As there are some modules out there that don't call _block_rehash() because it is time consuming, and just assume that block table is always up-to-date (which is not the case with current code), I suggest calling _block_rehash() on all active themes.
Please find my patch attached.
Comment #2
David Stosik commentedAnd here is a better patch replacing another _block_rehash() call in delete hook.
Comment #3
Johnny vd Laar commentedI've added this patch but I'm still thinking about removing the block_rehash completely from the module as I don't think this needs to be done by nodeblocks.
http://drupalcode.org/project/nodeblock.git/commit/a22093f
Comment #5
Johnny vd Laar commentedReplaced the block rehash:
http://drupalcode.org/project/nodeblock.git/commitdiff/f6aa32d