Closed (duplicate)
Project:
Context
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
8 Dec 2010 at 08:19 UTC
Updated:
12 Jun 2011 at 19:14 UTC
Jump to comment: Most recent file
Comments
Comment #1
askibinski commentedThe way I see it the title isn't anywhere loaded through context module as it is in a seperate table {blocks}. The body is loaded from {blocks_custom}.
In attached patch, I used the new drupal 7 block_load function to load the entire block object in case it is a custom block. It solves the problem but I think it needs work.
Comment #2
BarisW commentedHey Albert,
thanks. The patch fixes the bug. It needed a little tweak thought.
Instead of
it should be
As $block->cache checks if $block->bid isset, which is set the next line.
After swapping these two lines, the titles are back! :)
Thanks!
Comment #3
aidanlis commentedSubscribe
Comment #4
pivica commentedI have spend half a day trying to find some better solution for this problem, but no luck. Seems to me that approach from #1 is currently the only possible way to get titles for custom blocks.
Here is a new patch against latest 7.x-3.x-dev. Logic is the same like in #1 but I have added new static function block_load() into context_reaction_block class which I am using instead of Drupal block_load because I think that we should query block with delta and with theme_key.
I don't like this approach at all, but at least custom block titles will be rendered now.
Comment #5
timmillwoodPatch working fine here.
Thanks.
Comment #6
acouch commentedI was able to get around this without doing an additional block_load here: #345050: Blocks set with context do not respect <none> block title override. Basically it is able to grab the title from the database in the get_blocks function. Let me know if this works for folks.
Comment #7
scor commentedThe fix at #345050: Blocks set with context do not respect <none> block title override is a more generic and should address this particular case.
Comment #8
ggevalt commentedThis is a patch for 7. But what about 6? This is a problem in the 6.3 version of context, yet I can't find any reference to a fix. Is this going to be fixed in 6.3?
Big problem in our minds.