Skip Navigation

[Resolved] View returns no results found

This support ticket is created 2 years, 11 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 3 replies, has 2 voices.

Last updated by Christian Cox 2 years, 11 months ago.

Assisted by: Christian Cox.

Author
Posts
#2035323

I am trying to:
Display a Term with a View that lists taxonomy terms

I expected to see:
The Term information

Instead, I got:
No results found

I have a Taxonomy View, it queries a taxonomy
That View has a filter by shortcode attribute.
I insert that View to a archive of the same taxonomy
I want to display the data of a term I pass in the shortcode attribute.

I get no results found.

I tried to pass the Term ID of the current term, and of other terms, always get no results found
If I do not pass a shortcode attribute by term id it shows all term data, but that is not what I want.

Why would a view return no results found when inserted to the archive of the same taxonomy as it is querying?
Note that this is not using a Toolset Archive, it is implanted directly into the PHP template.
The View should in any case return the term data I pass to it with shortcode attribute, or do I get something wrong?

This is how the view is added to the template

$term_id = get_queried_object()->term_id;
$shortcode = '[wpv-view name="single-term-details-for-term-archive" terms="8"]';
echo wpv_do_shortcode($shortcode);

I get "no results found"

#2035879
Screen Shot 2021-04-28 at 1.55.03 PM.png
Screen Shot 2021-04-28 at 1.54.55 PM.png

Hi Beda, that's odd, I assume you've already tried the standard ​troubleshooting steps?
- Set cached="off" in the View shortcode to disable Views caching
- Test with only Toolset plugins active
- Test the same View in a Toolset WP Archive for this taxonomy with a default theme and other custom code deactivated

I've set up a similarly-filtered taxonomy View in a local test site in a standard Toolset WP Archive for the same taxonomy, but the View returns the expected term result as seen in the screenshots here, so the problem isn't immediately reproducible in a standard setup. I turned of the WP Archive and created a custom PHP template for the taxonomy archive and placed the same wpv_do_shortcode setup there, and the View is displayed as expected with one result again. Something else must be going on. Can you turn on Views debug mode in Toolset > Settings > Front-end Content and share screenshots of the corresponding debug panels for this taxonomy View?

#2038889

Well, sure enough it works on a clean install.

No idea what is wrong on the existing live install, other than it has 15K terms and "just a few posts" (like half a million).

Let's forget it. Not worth to duplicate such beast, and on a clean site I can confirm as well it works, I didn't do that when I reported, sorry for this.

On the live site I simply used a custom code now instead of a view, which is likely the better approach anyway
Actually creating the View took longer than writing the Custom Code, because somehow with 15K terms, the Query Filter edit area loads for several minutes until the interactivity is back.
So, win win.

Thanks and sorry the waste of time and ticket!

#2039711

Okay take care Beda

This ticket is now closed. If you're a WPML client and need related help, please open a new support ticket.