Skip to main content
Improved post formatting.
Source Link
kenorb
  • 14.3k
  • 10
  • 98
  • 168

I just had a similar issue, I had a block view showing the current category

1 Block view

2 Contextual Filter - Taxonomy term: Term ID - Provide default value (term id from url)

3 fields

4 filters

5 No results - Global text field

  1. Block view
  2. Contextual Filter - Taxonomy term: Term ID - Provide default value (term id from url)
  3. fields
  4. filters
  5. No results - Global text field

Like you, because the contextual filter was set to provide default value I never saw the no results text.

SOLUTION

SOLUTION

Edit the contextual filter and scroll down to the bottom, under

"When the filter value IS available or a default is provided"

1 check Specify validation criteria

2 leave validator as default

"When the filter value IS available or a default is provided"

3 Change "Action to take if filter value does not validate" to "display contents of No result found"

  1. Check Specify validation criteria.
  2. Leave validator as default.
  3. Change "Action to take if filter value does not validate" to "display contents of No result found".

Bingo, on the overviewOverview page with no term passed I get the no results found text, and when I go to a category page it picks up the term and displays the correct content.

I just had a similar issue, I had a block view showing the current category

1 Block view

2 Contextual Filter - Taxonomy term: Term ID - Provide default value (term id from url)

3 fields

4 filters

5 No results - Global text field

Like you, because the contextual filter was set to provide default value I never saw the no results text.

SOLUTION

Edit the contextual filter and scroll down to the bottom, under

"When the filter value IS available or a default is provided"

1 check Specify validation criteria

2 leave validator as default

3 Change "Action to take if filter value does not validate" to "display contents of No result found"

Bingo, on the overview page with no term passed I get the no results found text, and when I go to a category page it picks up the term and displays the correct content.

I just had a similar issue, I had a block view showing the current category:

  1. Block view
  2. Contextual Filter - Taxonomy term: Term ID - Provide default value (term id from url)
  3. fields
  4. filters
  5. No results - Global text field

Like you, because the contextual filter was set to provide default value I never saw the no results text.

SOLUTION

Edit the contextual filter and scroll down to the bottom, under

"When the filter value IS available or a default is provided"

  1. Check Specify validation criteria.
  2. Leave validator as default.
  3. Change "Action to take if filter value does not validate" to "display contents of No result found".

Bingo, on the Overview page with no term passed I get the no results found text, and when I go to a category page it picks up the term and displays the correct content.

Source Link

I just had a similar issue, I had a block view showing the current category

1 Block view

2 Contextual Filter - Taxonomy term: Term ID - Provide default value (term id from url)

3 fields

4 filters

5 No results - Global text field

Like you, because the contextual filter was set to provide default value I never saw the no results text.

SOLUTION

Edit the contextual filter and scroll down to the bottom, under

"When the filter value IS available or a default is provided"

1 check Specify validation criteria

2 leave validator as default

3 Change "Action to take if filter value does not validate" to "display contents of No result found"

Bingo, on the overview page with no term passed I get the no results found text, and when I go to a category page it picks up the term and displays the correct content.