The table gets stripped from fields in the views query for oc_orders fields; this breaks node queries where the included oc_orders fields have the same name as a field in another table (e.g. created)
To reproduce error:
- create a node view, add a page display, and set the path
- add any node field (node title for example)
- add the Ubercart Order: Order Creation Date
Save and view the new view.
The problem is due to some errors in how uc_orders is joined with the node table in hook_views_data()
See attached fix.
| Comment | File | Size | Author |
|---|---|---|---|
| uc_views.views_.tablejoin.patch | 800 bytes | setvik |
Comments
Comment #1
madsph commentedI think this is a duplicate of #465420: Product nid and/or title as argument - although I think you make the join slightly different in your patch. I can't reproduce the bug though with my version so I think it is fixed.
In the current branch (not released yet - but in cvs) the join is made in the following way:
Can you verify that that solves your issue, or am I reproducing it wrong?
Comment #2
PeteS commentedThis did the trick for me -- thanks for affirming that the problem was the node/uc_orders join.
(For others having problems, my symptom was plainly that as soon as I added the order created date as a filter, the view was trying to join node to uc_order_products using the order_id field, and obviously no such column exists in the node table.)
Comment #3
madsph commentedGreat - thank you for reporting :-)