Drupal Answers is a question and answer site for Drupal developers and administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have a bunch of nodes with terms in a certain vocabulary. The vocabulary consists of doctors' specialties, like "Gynecology / Obstetrics". Terms in this vocabulary have a few extra fields:

  • Singular noun form ("Gynecologist / Obstetrician")
  • Plural noun form ("Gynecologists / Obstetricians")
  • URL string ("obgyn")

I have a view that displays all the nodes associated with the term. The view's path is "doctors/specialties/%", and it has a Contextual Filter for the URL String field of the taxonomy term, via a taxonomy Relationship. So when you go to /doctors/specialties/obgyn, you get a page with a heading "Gynecologists / Obstetricians" and then all the content with that term.

This view previously worked perfectly, but at some point something changed, and now it returns 404. The preview in the Views UI just says "No query was run". When I delete the Contextual Filter, it shows all the normal SQL, but when I re-add it, it goes back to "No query was run".

Here's a dump of the view. Can anyone tell me what I'm doing wrong?

share|improve this question

When you add a contextual filter to a view, the preview should default to 'No query was run.' This is because you have to actually enter a value into the 'preview with contextual filters:' box before hitting preview. Doing this will refresh the preview and consequently show the SQL.

share|improve this answer
up vote 0 down vote accepted

I had already flushed caches and reloaded the page twice (yes, I'm positive, and yes, I swear) when I originally asked this question, but at some point my view magically started working again. So I guess I should have just flushed caches and reloaded the page harder.

share|improve this answer
I had the same. Just to prove that I'm not crazy I duplicated the complete view and voila it worked on the new one. No apparent reason the old view's contextual filter did not work. Flushing harder or flushing views cache did not help. No idea but recreating the same view appears to be the only option. – Yuri May 12 at 21:23
I just tested another time and found out that the problem appear in my case because my contextual filter was overwriting the default view display one. Clearly a bug in views, but hard to track what causes this.. – Yuri May 12 at 21:32

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.