Hi, thanks for the module.

I just tried the modules with views 3 instead of views 2, but could get it to work.

Is the module currently compatible with views 3, are there any plans?

Thanks

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

fourmi4x’s picture

Title: views 3? » Compatibility with views 3 ?
Version: 6.x-2.2 » 6.x-2.x-dev
Priority: Normal » Major

Hi, I also can't get it to work with views 3... Is it normal? Any plans to make it compatible?

liland’s picture

i have same problem. Didnt work with view3. I have error:
user warning: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal if there is no GROUP BY clause query: SELECT node.title AS node_title, node.nid AS nid, node.language AS node_language, COUNT(node.nid) AS node_count FROM node node LEFT JOIN term_node term_node ON node.vid = term_node.vid WHERE (node.moderate = 0) AND (node.status = 1) AND (term_node.tid = 7) AND (node.nid != 23) ORDER BY node_count DESC LIMIT 0, 7 in /var/www/site.com/sites/all/modules/views/plugins/views_plugin_query_default.inc on line 1150.

funana’s picture

same here. Views 3, not working. Block is not showing up.

fourmi4x’s picture

I got it to work with views 3 finally, with a quick (and probably very dirty) workaround : http://drupal.org/node/1014524#comment-4871192

dawehner’s picture

Title: Compatibility with views 3 ? » Compatibility with views 3
Assigned: Unassigned » dawehner

Assign for myself.

dawehner’s picture

Assigned: dawehner » Unassigned
Status: Active » Needs review
FileSize
1.36 KB

Here is a patch

a) It uses the views3 api to add a COUNT(). This automatically adds the right group_by part
The resulting query is

SELECT node.title AS node_title, node.nid AS nid, node.nid AS node_nid FROM node node  LEFT JOIN term_node term_node ON node.vid = term_node.vid WHERE (node.moderate = 0) AND (node.status = 1) AND (term_node.tid IN (50, 5, 9, 44, 29)) AND (node.nid != 302) GROUP BY node_title, nid ORDER BY node_nid DESC

b) For views2 it still uses the old code, because only views3 has proper groupby support.

Caseledde’s picture

Status: Needs review » Reviewed & tested by the community

Works. My bugs are gone.

Thank you dereine

R.Hendel’s picture

Status: Reviewed & tested by the community » Needs review

Hmm. I am not sure...
When comparing terms of node with therms of nodes, selected by similar-by-terms, than there are exactly no terms corresponding.
Content of field "similarity" displays 0% similarity. There seems to be something wrong in method which selects nodes.

dawehner’s picture

FileSize
1.36 KB

Mh due to whatever reason COUNT doens't work, you have to use count()

dawehner’s picture

FileSize
2.36 KB

This patch fixes the display of the field similarity as well.

R.Hendel’s picture

Status: Needs review » Reviewed & tested by the community

I could not apply patch directly, but after copying changes manually in code everything works perfectly :-)
Thanks, dereine!

funana’s picture

confirmed: http://drupal.org/node/1181566#comment-5240362 patch is working.
Had to uninstall, delete the view and reinstall the module though.

Danke!!

asb’s picture

The patch from #10 applies cleanly and seems to fix the compatibility issues with Views3. A "Clear all caches" through 'admin_menu' seems to suffice vor my View.

Thank you, Daniel!

Dries Arnolds’s picture

I also tested this patch in #10 and it works fine. Only had to clear cache.

On my site the problem wasn't that it wasn't working, but that the view always gave only one result. That's solved now.

asb’s picture

With the latest views-6.x-3.x-dev, smilarterms got hickups again. "Similar by term" blocks now show up on the weirdest places, including views pages (without a nid!). Also some links in "Similar by term" blocks point to strange targets (nid=1). I'll try to post more details if I find time to dig into this.

udvranto’s picture

Does it work with the final version of Views 3.0?

asb’s picture

@udvranto: Except for a number of other oddities of 'smilarterms' (that already existed in Views 2) it is working, as long as the patch is applied (#10).

chichilatte’s picture

Brilliant thank you! This should probably be committed as a working views 3 version?

vishnu.kumar7’s picture

Hello Everyone,
Thanks for your help..We are using Views 3 with Similar terms 6x.-2.2.... I have also applied the patch mentioned on comment 10.... However Similar content block is only appearing for one node type despite of proper setting of the block...

We have two different node type (articles and blogs) and having the same taxonomy for these node type... while browsing nodes of blog type, we are getting similar content nodes (which include both article and blogs) however while browsing nodes of articles type, similar content block is missing...

similar terms block is only visible for one node type...

Anyone else faced such issue ?

Regards
Vishnu Kumar

vishnu.kumar7’s picture

Hello Team,
Would like to report following issue which I experienced while using SBT2 (tested all the versions) with Views 3.0.

Node 1 (Content type: Blog)
Vocab: Tags
Tags: Term A, Term B, Term C

Node 2 (Content type: Article)
Vocab: Tags
Tags: Term C, Term D, Term E

Node 3 (Content type: Blog)
Vocab:Tags
Tags: Term A, Term C

Viewing node 1: Similar terms block is appearing (node 2 and node 3)
Viewing node 2: Similar terms block is not appearing
Viewing node 3: Similar terms block is appearing (node 1 and node 2)

similar terms block is configured for both of the node type however block is not appearing while navigating to content type = article

When i passed nid of node 1 or 3 (type=blog) in the argument, I am getting a result but when i pass nid of node 2 (type=article) in the argument, no query is run....

Block/query is only appearing for content type=blog

Please include this issue in the compatibility list..

Note: I have not changed anything with the default view while testing this scenario. Patch also did not helped. It only fixed the problem block display only one result

I am returning back to SBT1 (1.8) until it gets resolved... let me know if you need more information from my end...

Regards
Vishnu Kumar

hachreak’s picture

+1

When I upgraded the views module from 2 to 3, I had this problem: Mixing of GROUP columns (MIN(),MAX(),COUNT(),...) with no GROUP columns is illegal ......

The patch #1181566-10: Compatibility with views 3 seem to work for me! :)
When the patch can be integrated in the module?

Best,
hachreak

quicksketch’s picture

Category: support » feature
Status: Reviewed & tested by the community » Fixed

Thanks guys. Committed and pushed up to 6.x-2.x branch. This brings the module closer inline with the new 7.x-2.x branch too.

Status: Fixed » Closed (fixed)

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