Hi,

Finally .dev 3 running. For my new group when I am on the group page it says:

Notice: Undefined variable: links in commons_bw_create_all_widget() (line 67 of /httpdocs/profiles/commons/modules/contrib/commons_bw/commons_bw.module).

Greetings, Martijn

Comments

Summit’s picture

Hi,
Got this error with every group.
greetings, Martijn

Summit’s picture

One more thing..it only happens on the anonymous site, when I am logged in the error doesn't occur.

EDIT: may be something the same as: http://drupal.org/node/1148450#comment-4661560

greetings, Martijn

Summit’s picture

Hi,

I added $links[] = NULL; in function commons_bw_create_all_widget

Code becomes:

function commons_bw_create_all_widget($group) {
  // Collect definitions from implementing modules.
  $items = module_invoke_all('commons_bw_create_all_widget', $group);
  uasort($items, 'element_sort');
  $links[] = NULL;      <===== ADDED THIS LINE
  foreach ($items as $module => $item) {
    $links[] = $item['link'] . ' ' . $item['text'];
    // Populate the default content creation link.
    if (isset($item['default']) && $item['default']) {
      $default = $item;
    }
  }
  $output = '';
  if (!empty($default)) {
    $output .= $default['link'] . '<a class="commons-bw-create-choose"><span></span></a>';
  }
  $output .= '<div class="commons-bw-create-choose-bg"></div><div class="commons-bw-create-choose-holder">' . theme('item_list', array('items' => $links, 'type' => 'ul', 'attributes' => array('class' => 'commons-bw-create-all-widget-types'))) . '</div>';
  return $output;
}

Then the error was gone, is this a correct adding?

Greetings, Martijn

ezra-g’s picture

Assigned: Unassigned » ezra-g
ezra-g’s picture

Title: Notice: Undefined variable: links in commons_bw_create_all_widget( » Notice: Undefined variable: links in commons_bw_create_all_widget, lack of result counter in BW tabs
Status: Active » Fixed

I also fixed an issue that prevented the result count from appearing in the tabs.

http://drupalcode.org/project/commons_bw.git/blobdiff/d74d3373548dc3722b...

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.