i get a lot of errors like this

Location /?q=weblink/view/11
Message user error: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near ') AND n.type = 'weblink' AND n.status = 1 AND n.moderate = 0 AN query: SELECT COUNT(*) AS c FROM term_node t, node n WHERE t.nid = n.nid AND tid IN () AND n.type = 'weblink' AND n.status = 1 AND n.moderate = 0 AND '1' in /home/mhd-03/www.iosa.it/htdocs/includes/database.mysql.inc on line 125.

is this a bug or maybe i'm just making some mistake in my configuration? for the little I know about mysql syntax, i think this is correct, but it doesn't work anyway,

CommentFileSizeAuthor
#3 weblink-4.5.0-20050210.patch690 bytessyscrusher
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Junyor’s picture

The problem is probably in the "AND tid IN ()" part. Have you added a taxonomy for you weblinks?

StefanoCosta-1’s picture

of course I have a taxonomy. this error shows up when opening one of the weblink categories (taxonomy categories) pages, not when listing them. btw all pages open without any problem... it's only filling up my admin log!!

syscrusher’s picture

FileSize
690 bytes

My wife duplicated this bug on one of her sites, and sent me hunting for a fix. I found it!

In the weblink.module file, in function theme_weblink_page_view(), there is a section of code to handle parent categories, a section to handle child categories, and a section to handle related categories. In this last section, there is a typo apparently caused by cutting and pasting code from the first section and missing one needed change of variable name. $parent->tid needs to be replaced with $related->tid on line 755.

Here is the patch:

diff -u weblink.module weblink.module
--- weblink.module              2004-11-26 21:00:07.000000000 +0000
+++ weblink.module              2005-02-10 20:22:22.000000000 +0000
@@ -752,7 +752,7 @@
     $output .= '<p>' . t("Related") . '</p>';
     $catlist = array();
     foreach ($related as $related) {
-      list($dontcare, $related->link_count, $related->child_count) = _weblink_get_category($parent->tid);
+      list($dontcare, $related->link_count, $related->child_count) = _weblink_get_category($related->tid);
       $catlist[] = l(drupal_specialchars($related->name), "weblink/view/$related->tid") . _weblink_counts($related);
     }
     $output .= theme("item_list", $catlist);
StefanoCosta-1’s picture

yes, it's good. it works well for me. thank you very much.

Bèr Kessels’s picture

Status: Needs review » Closed (won't fix)

weblink will be relpaced by links. We no longer support this old version.