I really like what 'similar terms' is trying to achieve but I can't seem to get it working properly. I have a pretty fresh install of drupal 6.2. When I put the 'similar terms' block to the content area I get this warning:

user warning: Er is iets fout in de gebruikte syntax bij 'ROM node n INNER JOIN term_node tn ON n.nid = tn.nid WHERE tn.tid IN (' in regel 2 query: SELECT n.nid, n.title, COUNT(n.nid) AS ncount ROM node n INNER JOIN term_node tn ON n.nid = tn.nid WHERE tn.tid IN (21,13,18,10,12,16,14,11,9,8,15,17,22,19,20) AND n.nid != 4 AND n.status = 1 AND n.moderate = 0 GROUP BY n.nid, n.title, n.created ORDER BY ncount DESC, n.created DESC LIMIT 5 in /home/glowrich.com/www/sites/all/modules/similarterms/similarterms.module on line 154.

I haven't changed the code whatsoever.

Comments

Anonymous’s picture

I have the same problem, but with the latest 5.x version. It all worked fine before I updated it this morning but now the blocks are no longer showing and I get error messages like this one:

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 'ROM node n INNER JOIN term_node tn ON n.nid = tn.nid WHERE tn.tid IN (' at line 2 query: SELECT n.nid, n.title, COUNT(n.nid) AS ncount ROM node n INNER JOIN term_node tn ON n.nid = tn.nid WHERE tn.tid IN (12,2) AND n.nid != 1309 AND n.status = 1 AND n.moderate = 0 GROUP BY n.nid, n.title, n.created ORDER BY ncount DESC, n.created DESC LIMIT 5 in /var/www/drupal/includes/database.mysql.inc on line 172.

rmiddle’s picture

I am tiring to duplicate now. I wasn't seeing those issue in my test enviorment.

rmiddle’s picture

6.x-1.3 Fixes the problem in 6. I still need to get 5 fixed.

rmiddle’s picture

Note if you select a group the error should go away.

rmiddle’s picture

Status: Active » Fixed

OK 1.4 should fix this issue on both 5.x and 6.x.

Melle’s picture

rmiddle, thanks for the quick fix! Works like a charm now

Anonymous’s picture

Status: Fixed » Postponed (maintainer needs more info)

Melle - are you using 5.x or 6.x? I have installed the latest 5.x and even though I no longer get "user warning" the blocks simply do not show up at all...

Melle’s picture

I'm using 6.2.

rmiddle’s picture

TfR75,

It only shows up if you are looking at a node that has something to display. It wont show up on the main page or under views. It only shows up when you are looking at a node.

Anonymous’s picture

I know (and am very happy that it works that way) - just that it does no longer show up on node pages.

rmiddle’s picture

T1R75 do you have a site I can look at? I am using the 5.x-1.4 on one site and it is working fine? Can you grab a screen shot of your config so I can see how you are setup and see if I can duplicate the issue?

Anonymous’s picture

I am just looking into things. The problem is that some of the blocks are working on some pages and not on others. Blocks with a single vocabulary do usually seem to work fine - but I only use the one that has "Similar entries from ANY vocabulary." - that works on some pages and not on others, despite the others working fine. I will try and figure out whether there is a pattern. the site is www.arts-humanities.net

My configuration is:
Item count: 3
Content type limit: (none)
Users cannot control whether or not they see this block.
Visible for all roles
Show on every page except the listed pages. (none listed)

rmiddle’s picture

The none is highlighted correct? I know that sounds like a dumb question but as I said I use the same on my 5 site same setup exactly and it seems to be working fine.

Thanks
Robert

Anonymous’s picture

Addendum: it also seems to me that the module no longer chooses "similar" pages.

Example:
http://www.arts-humanities.net/node/help_questions_answers
This is a help page; it has only one tag "Digital Arts & Humanities". One would expect that similar pages are pages also tagged with that tag. However, that is not the case - similar gives various other pages (menu on the right hand side), *none* of which even have that tag. I have seen similar issues on other pages too.

rmiddle’s picture

Version: 6.x-1.2 » 6.x-1.4

Do you have a url to one that should be displaying but isn't that will likely help me the most in tiring to track down why?

Thanks
Robert

rmiddle’s picture

Assigned: Melle » rmiddle
Anonymous’s picture

The similar block is in the (grey) menu on the right hand side. You can see it on this page, for instance (or the above one):
http://www.arts-humanities.net/event/catac08_6th_international_conferenc...

It is not displayed on the following pages (for instance):
http://www.arts-humanities.net/event/call_for_papers_serious_games_on_th...
http://www.arts-humanities.net/escience/forum/escience_projects_meeting_...
http://www.arts-humanities.net/event/the_anthropology_of_youtube

And yes, the "none" in "Content Type Limit" is highlighted properly.

Thanks for your help, guys!

Anonymous’s picture

Version: 6.x-1.4 » 5.x-1.4

As it seems to work fine for you on 6.x-1.4 I changed it back to 5.x to make sure there is no confusion.

rmiddle’s picture

I have 2 sites with drupal 5 and 1 with drupal 6. Both seem to be working fine. check out middleswarth.net as that is my dump site. If you look at the bottom 3 items it shows how it is working fine with my tags.

Thanks
Robert

PS are you on IRC? I am robertlaptop in drupal-support.

rmiddle’s picture

TfR75,

I have just committed a possible fix to try. There will be a devel release in the next few hours with todays date see if that fix's your issue.

Thanks
Robert

Anonymous’s picture

Status: Postponed (maintainer needs more info) » Fixed

I have just installed the latest version and it runs smoothly on all pages (as far as tested, of course). Thank you very much for your work and the really fast response - that was great!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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