5
votes

I'm working on a job board. I want to display a view with a URL looking like /jobs/region/category. I configured my view with the path "/jobs/%/%". I created 2 "Content: Has taxonomy term ID" contextual filter. When I preview the view it is working correctly. When I go the page http://www.mysite.com/jobs/chicago/medical for example, it is working as well, I have the list of medical jobs in the Chicago area. But if I go to http://www.mysite.com/jobs/chicago, I receive a "Page not found".

It set the value of "WHEN THE FILTER VALUE IS NOT IN THE URL" for the second filter to "Display all results for the specified field". I also tried to provide a default value but nothing is working.

I read several topics for similar problems but I've found no solution so far.

Thanks

1
Allright, I looked for the solution for hours and as soon as I post my question I understand what's wrong. So here is the solution for me, in case someone else is facing the same problem. I just needed to edit the path of the view to /jobs/%. I don't need the second "%" as this arguments in not compulsory. - user1150316
I had the EXACT same problem. Thanks for your help! I was searching hours for the answer! Maybe you should post this as the answer? - jpmorris
This also helped me...I was wondering how common this issue in a webpage and how few correct description around the web... thank you very much this question! :) - csikos.balint

1 Answers

3
votes

The path should probably actually just be "jobs" depending on your site structure. The wildcarding is handled by views itself and allows you to determine defualt behavior for no first argument (404, list all, populate a sane term id, etc).