Skip Navigation

[Resuelto] I removed Custom Fields, but they still show up in Views…

Este hilo está resuelto. Aquí tiene una descripción del problema y la solución.

Problem: I have deleted several custom fields from Post Field Control, but they still appear in the list of filter options in Views Query Filters.

Solution: Clear the Views custom field cache in Toolset > Settings > Front-end Content.

This support ticket is created hace 3 años, 7 meses. 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.

Hoy no hay técnicos de soporte disponibles en el foro Juego de herramientas. Siéntase libre de enviar sus tiques y les daremos trámite tan pronto como estemos disponibles en línea. Gracias por su comprensión.

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)

Este tema contiene 4 respuestas, tiene 2 mensajes.

Última actualización por shawnW-3 hace 3 años, 7 meses.

Asistido por: Christian Cox.

Autor
Mensajes
#2022457
views-with-removed-fields.jpg

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.

#2022493

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.

#2022553

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?

#2022565

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.

#2022575

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.