When I set this as a widget on a new site (admin/structure/types/manage/page/fields/field_category/edit?destinations%5B0%5D=admin/structure/types/manage/page/fields), I get a white page with the error:

PDOException: SQLSTATE[HY000]: General error: 1 ambiguous column name: tid: SELECT d.tid AS tid, d.name AS name FROM {taxonomy_term_data} d INNER JOIN {taxonomy_term_hierarchy} h ON d.tid = h.tid WHERE (d.vid = :db_condition_placeholder_0) AND (h.parent = :db_condition_placeholder_1) ORDER BY weight ASC, name ASC, tid ASC; Array ( [:db_condition_placeholder_0] => 2 [:db_condition_placeholder_1] => ) in _term_reference_tree_get_children() (line 147 of /home/p7r81176/public_html/sites/all/modules/term_reference_tree/term_reference_tree.module).

Same thing happens when I try to edit a node or user with this term reference field.

I have it working fine on another site that I've been using for a long time so I'm trying to figure out what the difference is.

Comments

Taxoman’s picture

Category: bug » support

So it is not clear whether this is a bug or not (yet)...

troybthompson’s picture

No one else has had the problem? I still haven't found a solution. I've tried changing ->orderBy('tid') to specify d.tid and h.tid and even deleted the line completely. The error goes away, but then no options show on the add form, just the field name. Since it's just an order thing I'm wondering if there's a different problem and this is just a symptom.

dave reid’s picture

Status: Active » Closed (duplicate)