Closed (fixed)
Project:
Context
Version:
6.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
16 Aug 2011 at 19:40 UTC
Updated:
3 Dec 2020 at 15:25 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dalinSince this hook will only be implemented if Block module is enabled, then we can let Block module do the heavy lifting.
Comment #2
adamdicarlo commentedThis isn't specific to Blockcache Alter -- I just ran into this bug when using hook_block_info_alter() to remove blocks from a certain module -- and found they were still on Context's block list.
This patch fixes the problem for me. Here it is rerolled to be compatible with Drush Make, and giving attribution to @dalin.
Only questionable part of the patch is that if the block module is disabled, hook_block_info_alter() still isn't called. Should it be?
Comment #3
adamdicarlo commentedHopefully clarifying title.
Comment #4
dalinI thought about that too, but if we ignore Context module for a moment, if Block module is not enabled the hook doesn't get called either. Otherwise we have to duplicate _block_rehash() which would not be fun.
Comment #5
fabianx commentedFor fixing the blockcache_alter problem:
Here is another patch, which is much simpler and works for D6 and D7 the same.
The only thing it does is retrieve the cache value also from the database, but that works for blockcache_alter in all circumstances.
This is obviously much simpler and does not fix the other problems context has with blocks, but it fixes blockcache_alter and that was what I needed.
Comment #6
fabianx commentedAnd the D6 version for fixing blockcache_alter with context:
Same approach as D7 version.
Comment #7
fabianx commentedAdd Performance tag, because with blockcache_alter sites can be much much faster and context is preventing this without this patch.
Comment #8
bastnic commentedI must agree with Fabianx. I updated the context_blockcache_alter with his patch and with it everything work without patching anything. But it will be easier to include it directly into context.
Comment #9
bastnic commentedAs I said before, the patch in #5 works perfectly in the context_blockcache_alter, which is used on a number of websites in production.
It gives a real performance boost for almost all website where it's installed, so I set it to reviewed and tested by the community.
Comment #10
tekante commentedPatch from #2 applied after confirming that it indeed allowed for a hook_block_info_alter to be honored by context. I believe this removes the need for #7 but if not please reopen.
Should be available in the next dev build.
http://drupalcode.org/project/context.git/commit/92d0c33bbe931e99b89f313...
Comment #11
fabianx commentedI need to check this ...
Comment #13
fabianx commentedNeeds to be ported to D6 still ...
http://drupal.org/node/1251240#comment-5893638
should still work though.
Comment #14
fabianx commentedTrying a needs review of #6.
Comment #15
paulocsAs the issue was already fixed in 7.x-3.x-dev branch and 6.x-3.x-dev is no longer supported, I'm updating issue status.
Thanks all.
Comment #16
paulocsComment #17
paulocs