Closed (cannot reproduce)
Project:
Ubercart Views
Version:
6.x-3.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
18 Aug 2010 at 07:41 UTC
Updated:
8 Feb 2012 at 14:58 UTC
Hi Guys
I have an issue when creating an "Order Products" view and adding a filter for "Taxonomy: Term ID (with depth)".
Some how Views tries to filter using 'uc_order_products.vid'
SELECT uc_order_products.order_product_id AS order_product_id,
uc_orders.order_id AS uc_orders_order_id,
uc_orders.delivery_first_name AS uc_orders_delivery_first_name,
uc_orders.delivery_last_name AS uc_orders_delivery_last_name,
uc_order_products.qty AS uc_order_products_qty,
uc_order_products.title AS uc_order_products_title,
uc_order_products.price AS uc_order_products_price
FROM uc_order_products uc_order_products
LEFT JOIN uc_orders uc_orders ON uc_order_products.order_id = uc_orders.order_id
LEFT JOIN node node ON uc_order_products.nid = node.nid
WHERE ((uc_order_products.vid IN (
SELECT tn.vid FROM term_node tn
WHERE tn.tid = 9
)) AND (node.vid IN (
SELECT tn.vid FROM term_node tn
WHERE tn.tid = 11
)))
So, even when views knows that "uc_order_products.nid = node.nid" it then tries to filter with uc_order_products.vid instead of node.vid
I added taxonomy as an argument too just to check what would happen, and it works correctly.
(uc_order_products.vid IN (
SELECT tn.vid FROM term_node tn
WHERE tn.tid = 9
comes from the filter
(node.vid IN (
SELECT tn.vid FROM term_node tn
WHERE tn.tid = 9
))
comes from the argument
Any clues where views is getting confused?
Comments
Comment #1
jm.federico commentedAh, right I was getting an:
unknown column uc_order_products.vid
Error
Comment #2
jm.federico commentedI guess it is a bug. Changing to "Bug Report"
Comment #3
longwaveCouldn't reproduce this, I managed to successfully make an ordered products view filtered on taxonomy. Can you paste an exported view that causes this error?
Comment #4
longwavePlease reopen with an exported view if this is still an issue.
Comment #5
millenniumtreeI had this error when using an exposed filter with 6.x-3.1
I got around the problem by creating a relationship to the node terms and filtering through that relationship.