Filter Missing
-
I’m using amr users plus and I’m experiencing the following issue:
1. I’m using the filters feature and have limited it to just two filters: Age and State and configured each for “*Field Value”. The first filter should contain values for ages 18-70 but instead contain numbers in brackets. The 2nd filter is working correctly.
Here’s a visual representation of what I’m talking about.
(label) (“|” separates each item in the dropdown menu)
Age 0(1) | 1(1) | 2(1) | etc.
State 18, 19, 20, 21, 22, 23….70Side Note: If I use more than 2 filters, the first filter always starts with the weird numbers in brackets causing the rest of the filters to be mismatched with their labels and the last filter doesn’t show up at all.
-
Th numbers in brackets are the counts of how many times the value has been found. You should be seeing them against the state option too (once you have rebuilt cache) – see https://directories.wpusersplugin.com/simple-user-list/
so you have one person at 0, one at 1, one at 2 etc.
Please rather use the column value filters if you only have one field in the column (the usual situation).
The so-called ‘field value’ filter is a fudge to cope when folks are combining fields into one column but still want to filter on one of the fields – an awful situation. Sometime soon (hopefully) the cache/csv part will be rewritten and the need for ‘field value’ filtering will fall away. Will have to figure out an upgrade conversion for anyone who is using it.That said for your age example, a warning: I have recently become aware of a problem when one filters on ‘numbers’ with various lengths. The filtering is ‘fuzzy’ for complicated reasons (complicated fields again). It’s fine when for example one is filtering values where one value is never a subset of another. So if your ‘states’ are always two digits they should be fine.
However ages may not be : ie filtering on a ‘1’ may also return users ’10’ and ‘100’. Filtering on ’10’ may return ‘100’ as well.
I’m looking at this at moment (just identified the issue). While a fix seems obvious, I have to make sure I’m not going to ‘break’ the complicated scenarios – there was a reason the filtering was a bit fuzzy. so sorry about that part.
What plugin are you using to create the States (wonder why they didnt use state codes? You may want to use the filters or pluggable functions to show them in a more useful way.
Thanks for the detailed response. I totally get what you’re saying and I have changed from *Field Value to *Column Value. However, I still don’t understand why the age filter looks like it does. For example, I have only one user on my list that has completed a form. His age is 26 and appears in the age column. The options in my Age filter are: Show All and 0(1). Shouldn’t I have an option that says something like 26(1), meaning 1 person at age 26? Please see my page here https://choochooclan.com/surrogate/members3/
so that you know exactly what I mean.Hi your list is not public so I don’t have access to it.
Sounds strange – Have a look in phpmyadmin what is actually being stored in the usermeta for that user. Unusual to store ‘age’ as that changes every year. Would be more usual to store date of birth and have a function calculate the age. What are you using to store / calc the age? Can you dump that usermeta value?
Note: there will be a fix going up soon for the number problem I alluded to above, but your problem sounds different.
I can send you admin access. how can I do that privately.
better yet, if you want you can go ahead and register and it will give you access.
https://choochooclan.com/surrogate/wp-login.php?action=register
For this questionnaire, the age is captured from a select list of numbers from 18-70. There is no calculation of age. When I check in phpMyAdmin, I can see the actual numbers that were selected for each user.
Hi – i logged on quickly and can see what you have told me – looks like somehow it is picking up the state values. And it looks like that state filter is picking up a real state code.
Possibly somehow your filters and fields are not in sync. Might happen if you go in and out of the config.
Try going back into the config list and back into the filtering setup and make sure everything is in sync.
I’ll try recreate my end so I can debug it. If you can email me anmari@anmari.com a sql dump of your usermeta that make it easier.
See here https://choochooclan.com/surrogate/members2/ your state is showing as CA, not a number.
Did you add/change fields AFTER seting up the filters ?
I do believe I have updated fields after the filters were set up. I’ll go back and try to sync everything. I’ll also send you an sql dump of the usermeta and send it to you shortly. And thanks for peeking into my site to help troubleshoot. I do appreciate it.
Hi – wow – do you know that your test data has 3119 distinct meta keys !! The admin pages struggled trying to offer a form with 3119 lines of possible fields to configure. very large admin forms won’t alway save all the data. See https://anothersysadmin.wordpress.com/2012/02/16/php-5-3-max_input_vars-and-big-forms/.
I strongly suggest you hop into phpmyadmin and delete from theuser meta any test data you no longer need – it looks like you have experimented a bit as there are many similar/different fields.
I think you definitely must have got yourself confused with the fields – you had ‘hidden’ fields (starting with an underscore – hidden because in post meta the underscore fields will not show in the custom post boxes.) and non-hidden fields with the same name – some of this may have been created by the ACF plugin (it does something weird like that). For those unwanted ACF fields (the one with the underscore and that just have ‘field..’ in the data – in the find fields scren you can tick the ‘exclude from reports’ to make life easier (or delete IF ACF doesn’t need them). Try not to have fields with the same ‘nice name’ – it’s confusing. Unless you exclude one, you may find yourself using one somewhere and another somewhere else.
Also check your headings – if you call column 2 ‘Age’ and then change what col2 has as a field, it will still be headed ‘Age’.
eg donor_age and _donor_age, as well as fields like
donor_age_first_period and _donor_age_first_periodthen you have many ‘state’ fields state_address, state_address2 and so on.
I couldn’t see your surrogate list – was not available. I have dummied up a couple of lists – working on my local host based on your test data and will email them to you – import them and rebuild.
On the plus side – I’ll definitely be loking at better ways to cope with vast quantities of user meta keys!!
Ok, let me just say right up front that yes, I have a boatload of fields. I discovered problems with saving fields early on while building the 2nd list and found the fix just like the link you sent. Instead of bumping the number up to just 3000, I went ahead and did this:
`max_input_vars = 1240000
suhosin.post.max_vars = 1240000
suhosin.request.max_vars = 1240000`I knew I still had probably 5 times as many more fields to create so I wanted to make sure I didn’t have a problem saving fields after I spent a good amount of time creating them.
I made every attempt not to duplicate field names because I knew that would create huge headaches. Maybe I missed some. I also noticed that using file names with “_” at the beginning of the field resulted in the field not showing so I made every attempt to correct that as well. I just checked my field lists and none of them have an underscore at the beginning of the field names so I don’t know why the “Find any New Fields” tab is still showing those fields. I think it’s a bug in ACF. I still don’t know that if I delete a list of fields would that mean all of those fields get deleted in the database along with the data collected in them or if they remain stored in the database.
For similar fields in different lists I figured that I could name fields something like “state_address” and “state_address2” and avoid problems. Is this wrong? Would naming similar fields of different lists be better as: “donor_state” & “surrogate_state”? Should I avoid using underscores at altogether?
Regarding Columns:
If I name a column Age but then later decide I don’t wanted Shoe Size to replace Age, I would first go to configure a list and then remove the Display Order number from Age and put it on the Shoe Size field’s Display Order box. I would then go to edit Headings and change it accordingly. Click Update, then click Rebuild Cache. Is this not correct?I’m at the point where I want to just delete all the lists and start from scratch and follow some specific rules now that I have a better understanding. Judging by your remarks I’m realizing that I should already have conclusively decided which columns of user data I want displayed in the user lists so that I don’t go changing them around and confusing the system.
BTW, thank you so much for sticking with me on this. Your support and attention has been invaluable.
Hi,
find fields will find whatever is in the user meta, so unless you specifically go in and delete the usermeta records, the plugin will find the old test data – which kinda adds to the load in the admin forms unnecessarily. Getting very familar with phpmyadmin and it’s search/sort and filter options is very helpful when playing around with test data.
I don’t know why ACF creates those extra meta records with teh underscores and the ‘field%’ values – seems quite redundant to me. (and of course confusing when find fields finds them and strips out the underscores to make a ‘nice name’ – you end up with two fields with same lable/name and have to be careful which one you choose. )
“state_address” and “state_address2” should be fine, so long as you have consistent usage.
Process described above is right.
Did you get the email with the lists I created for you to import? They worked on your test data in my local system – once I figured out which fields you might be using.
For future releases I might see what I can do to help in these high volume meta key situations:
- maybe add a ‘check all’ for the hide from reports, then one can just untick a few – would make the config screen easier. To manually tick several thousand keys is impossible!
- maybe see if there is someway to detect and highlight discrepancies or original/tech field names?
- maybe break down the configure screen?
- The topic ‘Filter Missing’ is closed to new replies.