Term sorting is incorrect in flat term selector#47795
Term sorting is incorrect in flat term selector#47795Mamaduka merged 3 commits intoWordPress:trunkfrom
Conversation
…rch like a tag cloud rather than a name search. Does not scale for sites with lots of terms of a taxonomy.
Mamaduka
left a comment
There was a problem hiding this comment.
Thank you, @mauteri!
I think query changes make sense here. The order: asc and orderby: name are default arguments for the request, so I think we can even omit those.
P.S. Rebasing on the top of the trunk, should fix the failing React Native tests.
|
Thanks @Mamaduka! Just committed those changes. :-) |
|
Is it possible to adjust this to get back the original behaviour? On a site with 10k tags, this change was a huge step backwards in usability. Having the most common tags show up first was very important to make the users use the most common tags. Can I use a filter somewhere to get the count rank back? |
|
One of the main issues was tags not even showing up in the search when you have many similarly named as it caps the number to choose from to 20. You could type the whole tag name and it wouldn't appear in the list (like it didn't exist). I think that's a bigger issue. |
|
For me, it's definitely the smaller problem here by a wide margin, but yeah, I can see that may not be the majority view (in our case, similar but more common would be preferable to exact but rare). But I wasn't asking to roll this back; I was asking for a method to adjust this locally. But as this comes from JS, looks like there isn't a filter I can use to adjust this. Having some way to control this locally would be great. |
|
I think a filter would make sense for your needs, but yeah, I think majority of sites would expect the order to match what is being searched for. |
|
I'll try to put in a PR for a filter here sometime in the next week. |
What?
The current search for term selection component is to search by most popular rather than a name search. With a limit of 20 terms to show up, this could mean the tag you are looking for does not show up on the list. This does not scale for sites with lots of terms of a taxonomy. We discovered it on one of our sites that has 13K tags.
Why?
For sites with lots of tags, especially similarly spelled tags, it could result in the term not appearing in the autocomplete.
How?
Since this is a search by name, it should have an orderby
nameand orderascto ensure the term you are searching for appears in the list.Testing Instructions
test3)test, the first item will betest3with current codetestas the first item (which is what someone would expect)Current

Fix
