Skip Navigation

[Resolved] Non-Types metafields not listed in the filter editor

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

This topic contains 38 replies, has 2 voices.

Last updated by Christian Cox 6 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#601794

Hello
I'm using ACF Pro instead of Types for my metafields.
In the "Query Filter" section, I found the needed metafields but in the "Filter Editor" section , the metafields are not listed when I click on the "Load non-Types custom fields" button so i can't add new filters !

Thank you for your help

#601830

Hi, can you give me some more information:
- What type of field are you looking for?
- Have you published at least one post with some value in this ACF field?

#601834
types.jpg
types1.jpg

Hello
My fields are of the same types : True/False field, someones appear and someones doesn't appear !
Please see attached images
Thank you

#601858

Okay thanks, I'm not clear why this is happening.
- Please temporarily activate a default theme like Twenty Seventeen, then deactivate all the plugins except ACF Pro and Types. - Publish a new CPT post with all these true/false checkboxes checked.
- Create a new View and try to find the fields in the non-Types filters.

If you are still not able to find the fields, I will probably need to take a closer look to figure this out.

#601866

Hello
I diseabled all plugins except :
Advanced Custom Fields PRO
Custom Post Type UI
Toolset Views
And set active theme to : Twenty Seventeen

But the problem is still there !

Thank you

#602001

I diseabled all plugins except :
Advanced Custom Fields PRO
Custom Post Type UI
Toolset Views

Sorry I'm not clear: if you disable Custom Post Type UI, is the problem resolved? Is there some other reason you cannot disable this plugin and test?

Either way, it's probably best for me to create a clone of your site and install it locally so I can run some additional tests. If your site is online somewhere, you can provide login credentials here in the private reply fields. If not, I must ask you to create a clone and provide a download link here so I can run those tests.

#602091

Okay thanks, I downloaded a copy of your site and was unable to get the field to appear in the filter controls options myself. I've asked my 2nd tier support team to take a look and provide some assistance. Please stand by and I will update you as soon as I have more information to share.

#602092

Ok thank you in advance

#602684

Hi, my 2nd tier support team has offered the following solution:
- Activate Types
- Create a new Post Field Group and assign it to the Activites post type. Do not add any fields yet.
- Go to Types > Post Fields and click "Post field control" at the bottom.
- Search for "virtuoso" and click the link to control this field with Types.
- Click "Change Assignment" and assign the field to your new post field group.
- Search for "preferred_partner" and click the link to control this field with Types.
- Click "Change Assignment" and assign the field to your new post field group.
Now you should be able to find these fields in the View filter editor screen. Please let me know the results.

#602772
bug1_toolset.jpg

Hello

Thank you for the reply

I do as you mentionned, but there is still 2 problems :

1) I found "virtuoso" and "preferred_partner" but they are diseabled
2) When I diseable types plugins, "virtuoso" and "preferred_partner" disappear, I will not let Types plugin enabled only for this !!!

Thank you

#602965

1) I found "virtuoso" and "preferred_partner" but they are diseabled
Delete these two filters from the Query Filter section of your View first. Then you can add the filters again in the Filter Editor section.

2) When I diseable types plugins, "virtuoso" and "preferred_partner" disappear, I will not let Types plugin enabled only for this !!!
I will ask for some additional information and let them know you need a solution that does not use Types. Please stand by and I will update you soon.

#602994
activities.jpg
activities_filters.jpg

Hello
I think also that the serach not work as it must work

[wpv-filter-start hide="false"]
[wpv-filter-controls]
<div class="form-group">
    <div class="row">
    <div class="col-md-4">
    <label>[wpml-string context="wpv-views"]Rechercher[/wpml-string]</label>
	[wpv-filter-search-box output="bootstrap"]
    </div>
    <div class="col-md-4">  
	<label>[wpml-string context="wpv-views"]Destinations[/wpml-string]</label>
	[wpv-control-post-taxonomy taxonomy="portfolio_category" type="select" url_param="wpv-portfolio_category"]
    </div>
    <div class="col-md-4">  
	<label>[wpml-string context="wpv-views"]Tarifs Contrat[/wpml-string]</label>
	[wpv-control-postmeta field="tarifs_to" type="select" source="custom" url_param="wpv-tarifs_to" values="0,1" display_values="Non,Oui"]
    </div>
    </div>
  
    <div class="row">
    <div class="col-md-4">
	<label>[wpml-string context="wpv-views"]Virtuoso[/wpml-string]</label>
	[wpv-control-postmeta field="virtuoso" type="select" source="custom" url_param="wpv-virtuoso" values="0,1" display_values="Non,Oui"]
    </div>
    <div class="col-md-4">
	<label>[wpml-string context="wpv-views"]Preferred Partner[/wpml-string]</label>
	[wpv-control-postmeta field="preferred_partner" type="select" source="custom" url_param="wpv-preferred_partner" values="0,1" display_values="Non,Oui"]
    </div>  
    <div class="col-md-4">
    </div>  
  </div>  
  
</div>

[wpv-filter-submit output="bootstrap"] [wpv-filter-reset output="bootstrap"]

[/wpv-filter-controls]
[wpv-filter-end]

When I set in any selectfield option to "Yes", before clicking on submit button, all others selectfield have only 1 option value "No"

Thank you for your help

#603010

When I set in any selectfield option to "Yes", before clicking on submit button, all others selectfield have only 1 option value "No"
This is probably because you have selected "Only show available inputs" in the custom search settings for this View, but you have not included a "null" option for these filters. Each filter should include a "null" option, which tells the View to disregard the filter. For example, see the values and display_values attribute changes below:

[wpv-control-postmeta field="virtuoso" type="select" source="custom" url_param="wpv-virtuoso" values=",0,1" display_values="-,Non,Oui"]

I added a comma at the beginning of values to indicate a blank value should appear before 0. I added a "-" to the display_values to indicate that the null option label should be "-", but you can change that if you'd like. Apply the same changes to the other select fields so that there is a null option for each filter. This will ensure that there is always some other option available in the filters.

If you want, you can also modify your custom search setting for "Choose if you want to hide or disable irrelevant options for inputs:". If you choose "disable" instead of "hide" the options will appear, but will be disabled if they produce no results found.

#603024
select1_before.png
select1_after.png

Hello
I applied your idea but not working
Please see attached images
Thank you

#603037

This is how it should work because of the configurations selected in the View editor.
- There is only one matching post with Virtuoso = Oui. It is here: activites/test/
- That test activite post has Tarifs Contrat = Oui.
- So if you select Tarifs Contrat = Non in the filters, then you cannot select Virtuoso = Oui because there are no matching results. There are no posts with Tarifs Contrat = Non and Virtuoso = Oui.
- Check your View configurations here in the custom search settings:
wp-admin/admin.php?page=views-editor&view_id=37936
- Find the "Paramètres de recherche personnalisée" section and click "Laissez-moi choisir des paramètres individuels manuellement".
- Find the section "Options à afficher dans les entrées de formulaire" and adjust the settings for this behavior here. Your current selections "Afficher seulement les options disponibles pour chaque entrée" and "Masquer" combine to produce the effect you have noticed on your site. Try to adjust these to produce different filter behavior.

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