i'm using a db_prefix in my configuration file (www.mysite.com.php) but see what looks like hard coded term_data in the source ...

  $result = db_query("SELECT tid FROM {term_data} WHERE vid = %d", $vid);

here's the error message as well :
http://www.newconnection.org/taxonomy

Comments

killes@www.drop.org’s picture

If you specify a db_prefix you need to make sure that your tables are named accordingly.

Ie, your prefix is foo_, then you need a table foo_term_data. The standard Drupal database scheme does not support this.

mandric’s picture

i edited the project.mysql to add the correct db_prefix but i also have to update the project.module code? or an include file somewhere. the image module (for example) had no problem.

mandric’s picture

i'm sorry, my last post ended up sounding rather vague, and i couldn't edit it, so here's a repost.

editing the db import files was no problem, i did that. that is also documented fairly well.

so i added the db_prefix manually to all the .mysql files, including project.mysql, before i imported them to the db.

but i shouldn't have to edit project.module or any include files. project.module should be using $db_prefix
from drupal/includes/www.mysite.com.php. I believe the other modules work like this, at least image.module
does.

mandric’s picture

i believe you didn't understand my bug report, so i set the status to active so you'll see it.

mandric’s picture

i think term_data hardcoded in taxonomy.module line 725 was breaking things.

[php?

$sql = 'SELECT name FROM term_data WHERE tid IN (%s)';

?]

mandric’s picture

so i think this is the patch

--- modules/taxonomy.module 24 Dec 2003 15:09:43 -0000 1.88
+++ modules/taxonomy.module 25 Dec 2003 07:14:30 -0000
@@ -736,7 +736,7 @@
break;
default:
// Build title:
- $sql = 'SELECT name FROM term_data WHERE tid IN (%s)';
+ $sql = 'SELECT name FROM {term_data} WHERE tid IN (%s)';
$result = db_query($sql, $taxonomy->str_tids);
while ($term = db_fetch_object($result)) {
$names[] = $term->name;

dries’s picture

Assigned: Unassigned » dries

Fixed in HEAD. Thanks mio.

Anonymous’s picture