Plz fix this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

doq’s picture

Title: node db_rewrite_sql() in autocomplete. » no db_rewrite_sql() in taxonomy/autocomplete
doq’s picture

Assigned: Unassigned » doq
Status: Active » Reviewed & tested by the community
killes@www.drop.org’s picture

Status: Reviewed & tested by the community » Needs review

please don't set to rtbc before a review.

drumm’s picture

Status: Needs review » Needs work

We currently don't rewrite anything other than node queries. Adding taxonomy will terms many more changes than one query.

killes@www.drop.org’s picture

Status: Needs work » Needs review

Drumm, that's not correct, we do rewriting for much more than node queries.

drumm’s picture

Status: Needs review » Needs work

Doesn't work.

user warning: Unknown table 't' in field list query: SELECT t.name FROM term_data WHERE t.vid = 2 AND LOWER(t.name) LIKE LOWER('%f%') LIMIT 0, 10 in /home/drumm/drupal/drupal/C-HEAD/includes/database.mysql.inc on line 120.

doq’s picture

FileSize
0 bytes

my mistake:(.
& now?

Frando’s picture

you submitted an emtpy patch ;)

doq’s picture

smth crazy with me:)
I will submit a full-tested patch in ~7 hours.

doq’s picture

Status: Needs work » Needs review
FileSize
613 bytes

here you go!

killes@www.drop.org’s picture

I am not 100% sure, but wouldn't db_rewrite_sql need t.tid in the select statement in order to work?

doq’s picture

Sorry, haven't understood. What do you mean?

killes@www.drop.org’s picture

db_rewrite_sql("SELECT t.tid, t.name FROM {term_data} t WHERE t.vid = %d AND LOWER(t.name) LIKE LOWER('%%%s%%')", 't', 'tid'), $vid, $last_string, 0, 10)

shouldn't the query look like this?

drumm’s picture

Status: Needs review » Fixed

Committed to HEAD (with the extra column suggested by killes).

Anonymous’s picture

Status: Fixed » Closed (fixed)