Since upgrading to 6.0-alpha4 (or newer -dev) my content taxonomy relationships cause SQL error like this:

user warning: Unknown column 'node_data_field_.tid' in 'on clause' query: SELECT COUNT(*) FROM (SELECT....

Examining the mysql tables, I think we have only field_name.value field in the content-type tables no field_name.tid.

This error is not occuring with a views -dev version from 12/03/2011, so the error came between this and the alpha4 release.

CommentFileSizeAuthor
#3 1-13116316-fix-views-integration.patch561 bytesDeFr

Comments

dawehner’s picture

Project: Views (for Drupal 7) » Content Taxonomy
Version: 6.x-3.0-alpha4 » 6.x-2.x-dev
Component: taxonomy data » Code

Well this is about content taxonomy primarily so let's move there.

einpol’s picture

i can confirm this behavior in d6. i´ve tested the d7 releases of views and content_taxonomy and its working there. only d6 has this error and as thomas73 mentioned in combination with views 6.x-3.0-alpha4. any updates on this?

DeFr’s picture

Status: Active » Needs review
StatusFileSize
new561 bytes

Found the same problem, attached patch fixes the bug here.

spike22’s picture

patch works like charm...just one word :) ...'field' to 'base field'... i wonder how much time it would have taken to us to find it :)
thx guys!

dawehner’s picture

Status: Needs review » Reviewed & tested by the community

This patch looks fine

Aleksey Zubko’s picture

works fine, thanks

thomas73’s picture

Status: Reviewed & tested by the community » Fixed

Upgrading Views to 6.x-3.0-rc3 resolved my issue!

Status: Fixed » Closed (fixed)

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

fourmi4x’s picture

Status: Closed (fixed) » Active

Re-opening the issue because upgrading to Views to 6.x-3.1 gives me the exact same error.

Thomas73 : did Views to 6.x-3.0-rc3 resolved your issue without adding the above patch ?

Has the patch been commited ?

DeFr’s picture

This patch wasn't commited, and I think it's still needed. @fourmi4x, can you apply the patch in #3 and check if it resolves your problem ?

fourmi4x’s picture

Status: Active » Reviewed & tested by the community

Hi DeFr, I confirm the patch resolves the problem.

boabjohn’s picture

+1 on the confirmation: all good. And can I just say "happy to buy you heroes a beer!" ... thanks for the incredible sharing of talent: you guys rock!

rjbrown99’s picture

For what it's worth, this patch was necessary for me to use the views support in conjunction with the views 6.x-3.0 release and the 6.x-1.0-rc2 recommended release of content taxonomy. The relationships support otherwise would not join on the correct field. So add me as a +1 to the RTBC queue.

This just used up 2+ hours of my life debugging views...

m.stenta’s picture

The patch in #3 works, and it's the RIGHT way to do it. See http://views-help.doc.logrus.com/help/views/api-tables

'base field' is what you're supposed to use... not 'field'. Views 3 is more strict about this than Views 2, which is why it doesn't work.

Please commit this! It's simple, correct, and RTBC!

  • DamienMcKenna committed 2c112af on 6.x-2.x authored by DeFr
    Issue #1316316 by DeFr: Fixed content relationships in Views.
    
damienmckenna’s picture

Issue summary: View changes
Status: Reviewed & tested by the community » Fixed

Committed.

Status: Fixed » Closed (fixed)

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