Skip Navigation

[Resolved] Previously working view (intermediary post type) suddenly shows no items found

This thread is resolved. Here is a description of the problem and solution.

Problem:
The user has a view of intermediary posts related to the current post and it does not return the expected results.

Solution:
It turns out that the query filter on the view was not set on the correct relationship.

This support ticket is created 4 years, 3 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.

Sun Mon Tue Wed Thu Fri Sat
9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 - - 9:00 – 13:00
14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 - - 14:00 – 18:00

Supporter timezone: Africa/Casablanca (GMT+01:00)

This topic contains 3 replies, has 2 voices.

Last updated by eveW 4 years, 3 months ago.

Assisted by: Jamal.

Author
Posts
#2196873

Sorry if this went through twice. I got a weird error message the first time.

Tell us what you are trying to do?
I need help troubleshooting a view that has stopped working. Forgive me if I get some terminology wrong.

I use the view repeatedly on my site to display lists of project info with related company info from a child view. The child view is based on an intermediary post type so I can filter the intermediary posts to display only the related companies that are Clients (not Contractors, Tenants, etc.). The parent view is filtered via the shortcode to show different kinds of projects [wpv-view name="project-links-table-all-test-2021" code="Offices"]. This setup has worked perfectly until recently.

Now the Client from the child view has disappeared from the lists, instead displaying "No items found." I'm an infrequent user of Toolset, so my skills get rusty, and I may have used some outdated code in the view that is no longer acceptable.

I created a duplicate of the problem view and placed it on its own page for easier troubleshooting:
hidden link

I have isolated the problem to this specific view. The project-company relationships are functioning correctly; my other views are still displaying the project and related company info. These views are built differently because they don’t need to be filtered by Client.

Page with a different kind of view that still works: hidden link

Nothing has changed in the site other than regular updates to WP, themes and plugins. I have tried turning off plugins but the problem remains. The problem occurs when the view is placed in a text widget on an Elementor page (which is used on most of my site), or on a regular WP page. I have searched the Toolset forum for a fix, but haven’t found a solution that works for me.

Thanks for any advice or insight!

#2197487

Hello and thank you for contacting Toolset support.

To better assist you with this issue, I believe I need to take a closer look at how the view is built, check the other views, and check them in and out of Elementor. Your next reply will be private to let you share credentials safely. ** Make a database backup before sharing credentials. **

Can you also tell what Clients would you expect for the Project "Apollonia Group Orthodontia Office"? It is the first item in the table hidden link

#2198193

Thank you for the credentials and for the additional details.

The relationship query filter on the view was not set to the relevant relationship. It was set to look for any relationship. After I selected the relationship on the query filter, it seems to fix the issue. Check this screenshot hidden link
Can you check from your side and confirm if this is resolved.

#2198403

Thank you! I never would have found that error.

I checked my notes from when I set up the view in 2020. My notes said that I had created the view with the filter the same way you set it up, using the Projects Companies relationship.

Somehow I made a mistake or accidentally edited the view to make it different from my notes, and I'm surprised that it was working for a year with the wrong filter.

Thanks so much for your help! My issue is resolved now.