Contextual filter not validating makes other contextual filters not work

Created on 8 August 2012, over 12 years ago
Updated 26 August 2023, about 1 year ago

I am not sure if what I want to do is possible using Views.

I want to create a View in order to filter nodes by author and/or by city (City is a Taxonomy field). I have created it and it seems to work well in all cases except when the first contextual filter does not validate. I mean:
http://www.mywebsite.com/page/user1/barcelona shows all nodes of user1 from barcelona: works OK
http://www.mywebsite.com/page/user1 shows all nodes of user1: works OK
http://www.mywebsite.com/page/user1/undefined shows all nodes of user1: works OK
http://www.mywebsite.com/page/undefined/barcelona should show all nodes from Barcelona but it doesn't: it doesn't work

I attached the view in this bug. There are two contextual filters. First one is "Author uid":

  • When the filter value is NOT in the URL: Display all results for the specified field
  • When the filter value IS in the URL or a default is provided:
    • Specify validation criteria
    • Validator: User
    • Type of user filter value to allow: Only allow string usernames
    • Action to take if filter value does not validate: Display all values...

And "City" filter:

  • When the filter value is NOT in the URL: Display all results for the specified field
  • When the filter value IS in the URL or a default is provided:
    • Specify validation criteria
    • Validator: Taxonomy term
      • City
    • Filter value type: Term name converted to Term ID
    • Transform dashes in URL to spaces in term name filter values
    • Action to take if filter value does not validate: Display all values...

Thank you in advance.

πŸ’¬ Support request
Status

Closed: outdated

Version

3.5

Component

Miscellaneous

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • πŸ‡ΊπŸ‡ΈUnited States philsward

    I had a similar issue as described.

    Oddly, I deleted all of the contextual filters and re-created them again. Then it "magically" worked. I had this problem on two different view pages within the same view. It makes me wonder if something didn't save properly which corrupts the DB and deleting then re-creating the contextual filters saves it proper.

    I could be grasping at straws in a complete coincidence too...

Production build 0.71.5 2024