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

dman’s picture

Sure the problem is not from somewhere else?

.dan.

http://www.coders.co.nz/

WhiteFire’s picture

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

WhiteFire’s picture

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.

WhiteFire’s picture

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.

WhiteFire’s picture

Don't ever name a theme and a module the same thing. Bad juju.

dman’s picture