I'm trying to set up pathauto aliases for a number of vocabularies to work alongside corresponding view pages. However, in doing so, I'm running into a 404s ("The requested page could not be found") when visiting the view's page path on the frontend. I suspect this is due to a conflict (and likely my misunderstanding of the relationship) between the views page paths and the taxonomy term path aliases. Note that I'm going to have a number of unique layouts and field sets for the various vocabularies, which is why I'm trying to create unique view pages and paths rather than the default taxonomy/term/% page.

An example taxonomy alias pattern is recipes/mealtime/[term:name].

Its corresponding view page path is recipes/mealtime/%, and it's configured with the appropriate relationship (taxonomy field on the node) and contextual filter (term name with validation on the appropriate vocabulary). When I use the view configuration to preview with a particular term, I get the expected results.

The issue, however, is that when I visit a path on the frontend, e.g. /recipes/mealtime/lunch, I get a 404. Note that I've ensured that the path aliases have been generated.

What is the proper way to accomplish what I've described?

Many thanks in advance.

  • What do you enter into Views Preview field to get the correct results? Must be sth with your Contextual config. Update the Q with that info. It doesn't seem you need Pathauto for this, but a Redirect or Global redirect modules? – prkos Apr 5 at 21:23
  • have you rebuild all the path aliases? and updated the bulk? by visiting admin/config/search/path/update_bulk – Joehoe Apr 6 at 9:29
  • According to this comment, I seem to have misunderstood the relationship between pathauto and Views page paths. The contextual preview was working in the Views admin and I had rebuilt the paths in bulk, to no avail. In the end, I just reverted to the default taxonomy/term/% path in on my view's page configuration and leveraged a View Mode to accommodate the unique layouts I was seeking for term listings by content type. Cheers! – Chris Apr 6 at 16:07

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.