For when you will update this module to Drupal 6.0

Comments

deekayen’s picture

Category: task » support
Priority: Critical » Normal
Status: Active » Fixed

HEAD already works in 6.0, but I don't have anyone that's given feedback to say it works correctly.

http://drupal.org/node/95612

int’s picture

Ok sorry, I will test..

phlepper’s picture

Status: Fixed » Active

I tried this version with 6.1 and receive the following error on my pages:

user warning: 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 '\'blog\',\'image\',\'page\',\'poll\',\'story\') GROUP BY n.nid ORDER BY score DE' at line 1 query: SELECT r.nid, MATCH(r.body, r.title) AGAINST ('<article text snipped>') AS in /<path snipped>/drupal/sites/all/modules/similar/similar.module on line 390.

Is this a problem with Similar Entries or my site's mySQL settings? According to the "Status Report", I am using PHP 4.4.4 and mySQL 5.0.27.

Thanks,
phlepper

deekayen’s picture

Category: support » task

weird. it does look like a bug-ish error. when I look at the source, there's inconsistent quoting around %s in the query, which should probably be cleaned up. in this case, the contents of $types are getting escaped and shouldn't be. I haven't tried it, but I would guess if you do the following find/replace, it'll fix it:

find
(%s) GROUP BY n.nid ORDER BY score DESC, r.vid DESC", $text, $taxonomy_tids, $text, $node->nid, $types, 0

replace
($types) GROUP BY n.nid ORDER BY score DESC, r.vid DESC", $text, $taxonomy_tids, $text, $node->nid, 0

find
(%s) GROUP BY n.nid ORDER BY score DESC, r.vid DESC", $text, $text, $node->nid, $types, 0

replace
($types) GROUP BY n.nid ORDER BY score DESC, r.vid DESC", $text, $text, $node->nid, 0

Putting vars in the query string is bad practice, so there should be an alternate solution for the real fix.

deekayen’s picture

i committed #4 to cvs

huayen’s picture

Is this module now stable enough for production site now?

deekayen’s picture

In short, I don't know, but I don't know why not. I haven't upgraded my personal site to D6 yet, which is usually when I know for sure something is stable or not. Try it and report back. If I could get just 1-2 people to say it works for them, I'll make a 1.0 release.

prof_stoopid’s picture

The HEAD Release is working fine here on D6.1

huayen’s picture

Installed HEAD, works perfectly for drupal V6.1, thanks.

deekayen’s picture

Status: Active » Fixed

That's two. Making release now.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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