After updating to the current dev version the following message is returned during building the tag cache:

Fatal error: Call to undefined function db_rewrite_sql() in /var/www/html/cm7/sites/all/modules/tagadelic/tagadelic.module on line 275

As a workaround I have commented the affected statement. What replacemant function or method should be used instead of db_rewrite_sql?

Comments

Bèr Kessels’s picture

Status: Active » Closed (duplicate)

Thanks for reporting, but this bug was already reported several times. In the various threads solutions and patches are proposed.

Jerome F’s picture

which issue is the duplicate one please?

all the issues I found are closed as duplicate and none provide the solution, if you follow the lead of the duplicate issues, you arrive to http://drupal.org/node/1160136

upgrading to todays (2011.07.07) dev version brings this error back.

Jerome F’s picture

Status: Closed (duplicate) » Active

last dev before Jul 07, the 2011-06-07's version didn't give this error, so something has been commited that makes it happen again

GStegemann’s picture

Yes, the same occurred here.

choy’s picture

I can confirm this update bug as well

Anonymous’s picture

I'm seeing the same bug after upgrading.

7huo’s picture

d7 07.07: $result = db_query_range(db_rewrite_sql('SELECT COUNT(*) AS count, td.tid, td.vid, td.name, td.description FROM {term_data} td INNER JOIN {term_node} tn ON td.tid = tn.tid INNER JOIN {node} n ON tn.vid = n.vid WHERE td.vid IN ('. db_placeholders($vids) .') AND n.status = 1 GROUP BY td.tid, td.vid, td.name, td.description HAVING COUNT(*) > 0 ORDER BY count DESC'), $vids, 0, $size);

d7 06.07:
$result = db_query_range('SELECT COUNT(*) AS count, td.tid, td.vid, td.name, td.description FROM {taxonomy_term_data} td INNER JOIN {taxonomy_index} tn ON td.tid = tn.tid INNER JOIN {node} n ON tn.nid = n.nid WHERE td.vid IN (' . implode(',', array_fill(0, count($vids), '?')) . ') GROUP BY td.tid, td.vid, td.name, td.description HAVING COUNT(*) > 0 ORDER BY count DESC', 0, $size, $vids);

travelertt’s picture

Same error on a first time install. Have to remove block from page in order to render page.

koppie’s picture

Priority: Normal » Major

awakenedvoice has it right - this is a bug after upgrading to Drupal 7.4. I even tried the latest dev version of the module (as of 7/7) and it has the same problem. I'm marking this as a "major" bug because not only does the module not work under the latest stable, secure version of Drupal, but the page won't even render.

Bèr Kessels’s picture

Priority: Major » Normal

It is a -dev version, so it not working is not considered critical, but should be expected. As mentioned in several warnings, one should never depend on a -dev version, it is precicely that: a version under development, and by its very name, not ready yet.

The problem, also, lies not in the code, so please stop offering solutions codewise. The problem lies with git and some branching and/or merging problems between the github branch, my local branch and the drupal.org branch.

Drupal.org has a really peculiar branching system, which conflicts with the defacto standard to which I already adhered. Switching from that to Drupals standard causes the wrong branch to be packaged as drupal-7.x--dev. You are actually getting Drupal 6 code when downloading the 7.x branch. I will look into it when some other bugfixing is done.

TL;DR something got screwed up in git, wrong version is being packaged. don't panic.

Bèr Kessels’s picture

Rolled back to an old version from github, removing several fixes from drupal6, and fixed several merging conflicts. Drupal packager should pick this up and produce a somewhat working d7 version again.

I kept the patch for the drupal6 security fix though.http://drupal.org/node/1095030

Bèr Kessels’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

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

sohk220’s picture

Issue summary: View changes

I am looking for some help as I can't seem to figure this out as every time I run the update I get the following error;

Fatal error: Call to undefined function db_rewrite_sql() in /usr/www/test/drupal-7.38/modules/taxonomy/taxonomy.module on line 478.

I upgraded from D6 to D7 with no major issues. Most pages show, but this message is such a burden on me...Any help would be great.