By WhiteFire on
If I enable this function in my tapestries.module, all the blocks on my page just vanish. I stripped the function down to the point it does not actually DO anything, other than break the site. They still show up in the block configuration page, they just fail to display.
/*
* Implementation of hook_block().
*/
function tapestries_block($op = 'list', $delta = 0, $edit = array()) {
if ($op == 'list') {
$blocks[0]['info'] = t('Tapestries MUCK character list and switcher');
return $blocks;
}
else if ($op == 'view') {
switch($delta) {
case 0:
$block['subject'] = t('Your Accounts');
$block['content'] = 'Block content goes here...';
break;
}
return $block;
}
} What am I doing wrong here?
Comments
looks ok
Sure the problem is not from somewhere else?
.dan.
http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards
After some further
After some further investigation it seems somehow related to my custom xtemplate theme... now I just have to figure out what I could possibly have done in there to cause a block to wipe out all blocks. O.o
Ok, so my theme was based on
Ok, so my theme was based on bluemarine. I copied the orignial bluemarine stuff into the themes/tapestries directory to try and figure out if my style.css or xtemplate.xtmpl were the problems... but I still have the blocks vanishing even with a fresh copy of both.
Now I'm very confused. Bluemarine works, this copy of bluemarine does not.
As far as I can tell there are no differences in setting between the two.
cd themes cp -a tapestries
cd themes
cp -a tapestries xtap
make xtap the default theme.
xtap theme works fine with the new block. the tapestries theme does not. Resetting to defaults the settings on the tapestries theme does not help either.
Serious WTF moment here.
The answer is:
Don't ever name a theme and a module the same thing. Bad juju.
Bad Juju
Bit me once too.
http://www.coders.co.nz/
.dan. is the New Zealand Drupal Developer working on Government Web Standards