Closed (fixed)
Project:
Chaos Tool Suite (ctools)
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Reporter:
Created:
17 Aug 2011 at 18:04 UTC
Updated:
27 Feb 2013 at 21:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
Soren Jones commentedComment #2
dixon_Here's a simple patch that makes block panes work without block module installed. It actually works pretty well. The only thing that modules implementing
hook_block_view()will notice, is that they won't get a full$infoobject passed around. But, the object still contains the most vital information,module, anddelta. The$infoobject won't containtheme,regionandweight, but those properties are rarely used insidehook_block_view().The patch also fixes the issue mentioned in the OP.
So, all in all, I'd say this is a pretty good trade off for making it possible to use blocks without block module installed.
Comment #3
rafaqz commentedThe patch isn't applying for me in current dev version:
Checking patch plugins/content_types/block/block.inc...
error: while searching for:
$block->title = NULL;
}
if (user_access('administer blocks')) {
$block->admin_links = array(
array(
'title' => t('Configure block'),
error: patch failed: plugins/content_types/block/block.inc:122
Thanks would be really great to have this working.
Comment #4
merlinofchaos commentedThe patch applied just fine fo rme; I committed and pushed it. This is awesome. Thanks!
Comment #6
dixon_Looks like the changes introduced by the committed patch in this issue, was reverted in another. Looking through the Git logs things got reverted here: #1275886: Error - Notice: Trying to get property of non-object in menu_block_view_alter()
Quoting tim.plunkett in comment #63 in that issue:
However, I don't agree with Tim ;) The changes introduced by that issue makes it impossible to run a Panels site using block content types without Block module since it's querying the
{block}table. The whole point of this patch was to be able to do that, because most blocks do work by passing a stub$infointohook_block_view().So here's a new patch that fixes the problem again :)
Comment #7
merlinofchaos commentedThe structure is odd where we first build an $info, then if block module exists we throw it away. Can we reorganize its so we only construct the partial $info block if necessary?
Comment #8
merlinofchaos commentedAs I think on it, I think I'd rather have the empty $info construct originate in _ctools_get_block_info() because the calling function doesn't really care about that detail anyway.
Comment #9
merlinofchaos commentedLooking at the current code, this patch is no longer necessary.