Hello all,

There's an issue with contextual filters where when a taxonomy term has an apostrophe in the title, the contextual filter requires the apostrophe to exist also. While this vaguely makes sense, I would have thought that it should also work when the taxonomy term is cleaned, as it does by default outside views. For example, Pathauto cleans apostrophes and special characters and browsing to a taxonomy term page still works correctly. Views contextual filters doesn't appear to work in this way and having an apostrophe in a taxonomy term breaks the view and you don't get a result back.

Comments

Geijutsuka’s picture

I'm having the same problem... Unfortunately, the URL has to be typed with the ampersand.
i.e.:
mysite.com/athletics/tournaments/men's-basketball = this validates
mysite.com/athletics/tournaments/mens-basketball = this fails

Contextual filters:
Content: Has taxonomy term ID (with depth) - term name converted to Term ID, transform spaces to dashes
Content: Has taxonomy term ID depth modifier

robhoward79’s picture

Am also having the same issue. Does anyone have a fix?

Geijutsuka’s picture

I wasn't able to fix the problem, but I've worked around it by using the Redirect module. I configured it so that anyone typing in the alias without the apostrophe was redirected to the page with the apostrophe. Certainly not an ideal solution... but it works.

robhoward79’s picture

Issue summary:View changes

I'm glad you found a workaround, but this isn't much help to me. The pages in question have multiple views that are breaking as a result. I'm gonna have to experiment with the different argument types I think...

filnug’s picture

The best solution for me has been inspired by the answer #3.

Install the module Global Redirect.
In views, set the path to "taxonomy/term/%" (do not use another path generated by Pathauto).
Global redirect will manage to automatically transform the "taxonomy/term/%" into your custom path made with Pathauto.