2

I'm trying to display a list of terms from a single vocabulary that have blank descriptions. I'm using views, and I've tried to set up some regexes as filters. A simple: [\w] returns all of the non-blank ones. However, when I try to do something like ((?!.[\w]).) which should negate the string, I get some sql errors. I tried filtering with not containing certain words (i.e. any words), and I tried "shorter than" 1, but it seems that the truly empty description fields don't show up on any of these.

Any thoughts?

0

Better late than never? The solution is perhaps a bit counter-intuitive, but you actually don't create a view of taxonomy terms:

  1. Create a View of [content-type] (A content type which uses your desired taxonomy).
  2. Add a Relationship to your taxonomy on that content type ("Content:[field-name-of-your-taxonomy]").
  3. Add a Filter Criterion using the Taxonomy term definition from your relationship and set the operator to "Is empty (NULL)." (At this point, we are seeing what we want, we just need to make it intuitive to view and eliminate duplicates.)
  4. Turn aggregation on so that each taxonomy term appears only once, even if used multiple times.
  5. Using an unformatted list style with fields, simply add a field for the taxonomy term name from your relationship.
  6. (Optional) Add a Sorting Criterion on the taxonomy term name to sort in alphabetical order.

My use case for this was having added taxonomy terms on certain pages and wanting to go back and add descriptions to the terms at a later date, after they were all done. It was helpful to have a page which only listed ones which still needed descriptions added.

Appendix

Aggregation is "necessary" if you have taxonomy terms which are used on more than one different node (virtually every case). If you don't turn on aggregation, you will see one instance of the taxonomy term for every time it is used.

Thus, technically, Steps 4-6 are all optional, but the whole point of this exercise is making it easy to view taxonomy terms without descriptions.

0

Try adding this to the filter field for the taxonomy term description in the regex: ^[\s]*$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.