I cannot filter for a one word taxonomy term in Views, when configuring Contextual filters to display results based on a taxonomy term, when specifying the validation criteria, using:

Validator: Taxonomy term, Filter Value type: Term name converted to term ID, Transform dashes in URL to spaces in term name filter values = Checked.

Where Page settings: Path = myview/%/list

For instance: http://www.example.com/myview/cool-tools/list will filter content tagged with the Taxonomy term "Cool Tools"

Whereas: http://www.example.com/myview/tools/list will not filter any content tagged with "Tools."

If I uncheck "Transform dashes in URL to spaces in term name filter values", I can filter for "/myview/tools/list" and "/myview/cool tools/list" (with the space in the URL - undesirable), but I cannot filter for /myview/cool-tools/list.

Will I need to clone the view and uncheck the "Transform dashes in URL to spaces in term name filter values" checkbox to have both one word Taxonomy terms and multi-word Taxonomy terms with dashes in place of spaces work as filters? It seems like there would be a more graceful way to achieve this result with one view.

  • Do you still need an answer to this? I have this working on my site with one view - but it's probably because views was updated in the last 4 years and now has this working correctly. If yours still doesn't work though I can provide you with my setup. – Dan Oct 12 '17 at 19:30
  • I don't need it now, but never hurts to post an answer to help future devs. – pxwise Oct 13 '17 at 4:29
  • Honestly pxwise, looking at my view, I have the exact same settings as you did. So I'm guessing it was fixed in a patch at some point. – Dan Oct 17 '17 at 21:43

Your Answer

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

Browse other questions tagged or ask your own question.