I have a "product" type, and a "brand" type, and create Nodereference from "product" to "brand". In the Views, I simply create one field to retrieve all terms associate with "brand", and set the type filter as "product". It reports the error below:
user warning: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near ' 38583, 38583, 38583, , 38582, 38582, , , , , 38580, 38581) ORDER BY td.weight, ' at line 1 query: SELECT tn.vid AS node_vid, td.* FROM term_data td INNER JOIN term_node tn ON td.tid = tn.tid WHERE tn.vid IN (38090, 37977, 37993, 38585, 38584, 38584, 38584, 38583, 38584, 38584, 38584, 38583, 38583, 38583, 38583, 38583, 38583, , 38583, 38583, 38583, , 38582, 38582, , , , , 38580, 38581) ORDER BY td.weight, td.name in /home/greatbre/public_html/sites/all/modules/views/modules/taxonomy/views_handler_field_term_node_tid.inc on line 83.
The error happens when there are some Nulls, " 38583, , 38582, 38582, , , , , 38580, 38581"
Comments
Comment #1
skyredwangHere is another issue with Nodereference Location (I don't know if they are same problem) (The setup is the same as above, "product" nodereference "brand", and each "brand" has a location)
Comment #2
merlinofchaos commentedAssuming Nodereference Taxonomy is a module (I've never heard of it, myself) then you failed to read these guidelines. If it's not a module, then I really have no idea what you're talking about, nor is there enough information here to debug this.
Comment #3
merlinofchaos commentedUnfortunately, your brief mention of user relationship doesn't really tell me what you're doing here. Views has lots and lots and lots of options; you know what you did with your view, I have no idea. You have to be very very specific.
Comment #4
skyredwangsorry for not being specific. I haven't managed reproduce this first error. But I managed to create a simple view with minimal settings to reproduce the second error (nodereference location):
I only added one relationship (nodereference) from "product" to "brand", two fields "product" title and "brand" location; One filter: Node Type = product. The rest settings are default. please let me know if you need other information.
here is the exported code:
The error message is here:
thanks
Comment #5
jeremy_a commentedI have also encountered this behaviour. If you use a taxonomy ID argument with a node reference relationship, you would expect the view to pick up the taxonomy categories of the node being referenced. Instead it generates this error.
Comment #6
merlinofchaos commentedThe second bug you mentioned should already be fixed in dev. I believe that's #324513: If a relationship table was added more than 1 hop away from the base, SQL errors resulted.
Comment #7
merlinofchaos commentedFixed in -dev.