Skip Navigation

[Resolved] Changing featured image alters results in views

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

Problem: After I updated the featured image of my post, the results in a View filtered by custom field are not what I would expect.

Solution: In this case, the issue is caused by the select field having a null value. Saving the post with an updated featured image set a null value for this field, which removes this post from this result based on the custom field query filter.

Try adding a default value and resaving the existing posts.

This support ticket is created 5 years, 6 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
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)

Tagged: 

This topic contains 2 replies, has 2 voices.

Last updated by davelow 5 years, 6 months ago.

Assisted by: Christian Cox.

Author
Posts
#1306663

I am trying to:
display oldest dog in database in a view
Link to a page where the issue can be seen:
hidden link
I expected to see:
Clifford hasn't got a featured image now, but is currently the oldest dog in the community. Views result displays correctly.
Instead, I got:
but when a featured image is assigned, clifford gets an image, but isn't the oldest dog anymore.
OR if Clifford's Date of Birth is amended in WP admin, even though still the oldest, the View Result doesn't pick it up.

#1307025

Hi, I think the issue here is not the featured image, but the "Status" field filter. Maybe editing the featured image is manipulating the Status value in some way, I'm not completely sure based on the information I have so far. As a test, try temporarily removing the Query Filter from this View and testing the results. If the results are more like you'd expect, then we know it's the Query Filter.

If you plan on allowing a null default value like "not selected", this is going to be an issue. Since the filter is looking for some value to compare against "remembered", a blank value could mean the post doesn't get included. Would adding another option to this select field be possible? If so, I would try adding a specific option for "not set", and making that the default selection in the custom field editor. Then resave the existing Dog posts to set some value for the Status field.

#1307041

Hi Christian,

Yes, the issue is like you suspected, the query filter. I will find a work-around based on your recommendation. My issue is resolved now. Thank you!