It looks like our Variable's on displaying items in the weblink_blocks no longer match up so no blocks are listed.

Thanks
Robert

Comments

nancydru’s picture

I'm getting blocks on my site. Which variables are messed up?

rmiddle’s picture

Since the block code is still in the main module and the block module here is what I see. In the main module we have.

function weblinks_group_settings($form_state) {
...
$form[$term->tid]['block'] = array(
'#type' => 'checkbox',
'#title' => t('Create block'),
'#default_value' => variable_get('weblinks_create_block_'. $term->tid, TRUE),
'#description' => t('Check to allow a block for this group to be created.'),
);

Then in the submit function we have.
if (!$values['block']) {
variable_set('weblinks_create_block_'. $values['tid'], $values['block']);
}
else {
variable_del('weblinks_create_block_'. $values['tid']);
}

But that variable doesn't seem to be used at all in function weblinks_blocks_block_list() {

rmiddle’s picture

Looking at the code this is weird. It looks like it should be displaying them all not displaying none no mater what that setting is set to.

Thanks
Robert

nancydru’s picture

Here's what I have:

function weblinks_blocks_block_list() {
  $block = array();
  // Get the tree of terms.
  $tree = weblinks_get_tree(0, FALSE, TRUE);
  $allow_groups = FALSE;
  if ($tree) {
    foreach ($tree as $term) {
      $term->create_block = variable_get('weblinks_create_block_'. $term->tid, TRUE);
      // If the admin said "no" to this block, skip it.
      if (!$term->create_block) {
        continue;
      }
nancydru’s picture

Status: Active » Fixed

committed

nancydru’s picture

Status: Fixed » Closed (fixed)

cleaning the queue