You are here

Drupal7的tagadelic模块老报theme_tagadelic_weighted()错误

查看Recent log messages.
经常看到一大堆的错误:

Type php
Date Tuesday, October 2, 2012 - 02:03
User 满意沟通
Location http://localhost/tagadelic/chunk/3
Referrer
Message Notice: Undefined index: voc in theme_tagadelic_weighted() (line 331 of E:\acquia\www\sites\all\modules\tagadelic\tagadelic.module).
Severity notice
Hostname 127.0.0.1

Type php
Date Tuesday, October 2, 2012 - 02:03
User 满意沟通
Location http://localhost/tagadelic/chunk/3
Referrer
Message Notice: Undefined index: voc in theme_tagadelic_weighted() (line 331 of E:\acquia\www\sites\all\modules\tagadelic\tagadelic.module).
Severity notice
Hostname 127.0.0.1

错误代码搜一下在官网找到解决方法:http://drupal.org/node/1435238
modules\tagadelic\tagadelic.module 331行

if (count($terms) >= variable_get('tagadelic_block_tags_' . $vars['voc']->vid, 12)) {
$output .= theme('more_link', array('title' => t('more tags'), 'url' => "tagadelic/chunk/{$vars['voc']->vid}"));
}

改为

if(isset($vars['voc'])){
 if (count($terms) >= variableget('tagadelic_block_tags' . $vars['voc']->vid, 12)) {
 $output .= theme('more_link', array('title' => t('more tags'), 'url' => "tagadelic/chunk/{$vars['voc']->vid}"));
 }}

前台没什么问题 发现登录后就报错无法登录
找了一个替代的模块
http://drupal.org/project/tagclouds

This module Provides a TagCloud and List of Tags.

Display
"Style" or which is defined in the CSS with 6 (by default) weighted styles. This is the classic Tag Cloud Style.
"Count" which is shown as "TagName(N)" where N is the number of times that term is used. (As shown in the sponsors Image Gallery Demonstration)

Tag clouds is a light weight stable module that provides span tags, optimizations; It is also singular in purpose and stable.

文章类型: