Tell us what you are trying to do?
This is something I've run into trying to solve a separate issue.
The separate issue is that I can't find a newly created field group in my filter options on a view. After not finding that field group, but seeing a huge number of unused fields, I realized a cleanup of unused fields was way overdue.
So...
Is there any documentation that you are following?
Yes, I followed the documentation here - https://toolset.com/forums/topic/clean-up/ - to remove the old fields.
It was pretty straight-forward. I deleted a ton of old, unused fields. They stopped showing up as options in the custom field group builder, which is a huge help, however they are still showing up in views as filter options (see screenshot) which was what prompted me to remove them in the first place.
Is there a similar example that we can see?
I wouldn't know of one.
What is the link to your site?
I'm not currently in a position to safely grant access to the site. Right now I'm just hoping it's something I'm not understanding that can be remedied with instruction.
Hi, in my experience, completely deleting a custom field from the Post Field Control screen should remove it from the options for Query Filters in Views. If that is not the case on your site, it's possible that there is some caching system holding on to those old fields. You can try clearing Views custom field cache in Toolset > Settings > Frontend Content. There is an option for clearing "Cache for custom fields" here. That would be my first suggestion, as well as clearing any server-side caching mechanisms like object caching, opcache, memcached, etc. If the deleted fields continue to show up in the filter options, we can discuss other options.
That worked! I no longer see the deleted fields, thanks.
Before I go, I've got one more thing I'd like clarification on. I've probably never noticed this, but if you have the same field in multiple groups, does that field only show in one group on the options for Query Filters in Views?
I think that's why I wasn't seeing the new Custom Field Group. Both fields in that group already appear in a different group (which is showing up). Can you confirm this the case? Would there be any issue at all choosing the field since it's the same field, only in a different group?
Before I go, I've got one more thing I'd like clarification on. I've probably never noticed this, but if you have the same field in multiple groups, does that field only show in one group on the options for Query Filters in Views?
You should not realistically be able to have the same field in multiple groups, because each custom field must have a unique slug. That uniqueness is not per field group, it is per site. You could have two fields with the same name but different slugs, and they should both show up in their respective groups in the filter option list. Selecting the wrong field would result in unexpected filter results, usually "no results found" in the case where you select a custom field that is in a field group that is not associated with the post type shown in the View.
That makes sense to me, I was just concerned that there may be a path to consider being that the same field existed in two groups (which is what I want). Thanks, this solved my issues and addressed my concerns.