Agaric Design Collective

When showing taxonomy terms with view, filter by node types with the vocabulary you want

By Benjamin Melançon
on 20 Jan
2 comments

Key words and phrases

all taxonomy terms output in a view

Tags

Description

A view with "all taxonomy"

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 ' 219, , , , , , , , , , , , , , , , , , , , , , ) AND td.vid IN (2) ORDER BY td.' 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 (124, , 219, , , , , , , , , , , , , , , , , , , , , , ) AND td.vid IN (2) ORDER BY td.weight, td.name in /iic/web/pdonline-dev/htdocs/profiles/scf/modules/contrib/views/modules/taxonomy/views_handler_field_term_node_tid.inc on line 83.

add a filter for node type profile:


SELECT users.uid AS uid,
   users.picture AS users_picture,
   users.name AS users_name,
   node_users.title AS node_users_title,
   node_users.nid AS node_users_nid,
   node_users.vid AS node_users_vid
 FROM users users 
 LEFT JOIN node node_users ON users.uid = node_users.uid AND node_users.type = 'profile'
 WHERE node_users.type in ('profile')
   ORDER BY users_name ASC

Two things I did that helped out here:

1. Re-linked 'profile' as the content_profile node type. Not sure how that got de-linked, maybe in upgrading content_profile.

2. The "All Taxonomy Terms" portion of the member view (for affiliations from the profile node) was producing an SQL error: "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 (124, , 219, , , , , , , , , , , , , , , , , , , , , , ) AND td.vid IN (2) ORDER BY td.weight, td.name".

Filtering by node type = profile, as proper filtering does in so many cases, fixed this view; affiliation taxonomy terms show up now and only users with profile nodes show up in the member directory view.

 

WASTE OF TIME

ANOTHER POST THAT IS ONLY A PARTIAL DOC. WHY BOTHER. WHY NOT MAKE THESE POSTS MAKE SOME SENSE. IT IS LIKE TRYING TO READ SOMEONES MIND.

Posted by Visitor (not verified) on Fri, 2009-09-04 04:44
My first dedicated heckler

This is so sweet. Someone cares.

But no I will not take ADHD medication. My standpoint on all such things has always been that my mind is altered enough without any sort of chemical additives.

This post actually makes sense to me. How do you even get here without running into the same SQL error? But I thank you for your interest and concern.

Posted by Benjamin Melançon on Fri, 2009-09-04 06:56
Post new comment
The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <blockquote> <h1> <h2> <h3> <h4> <h5> <h6> <small> <pre> <strike> <sub> <sup> <kbd> <s>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.
  • You may post code using <code>...</code> (generic) or <?php ... ?> (highlighted PHP) tags.

More information about formatting options

CAPTCHA
This question is for testing whether you are a human visitor and to prevent automated spam submissions.
Image CAPTCHA
Copy the characters (respecting upper/lower case) from the image.