Related to #2372225: add sort setting for taxonomy term autocomplete results
Problem/Motivation
As explained in #2372225-10: add sort setting for taxonomy term autocomplete results the term autocompletion have no explicit orderBy clause for now.
The problem is that, in this case, we cannot predict the order of the results as it will depend on the database engine, its version, the type of the storage and the usage of database indexes.
Doing some tests, drupal.org seems to sort the results ordered by name while a personal D8 install on mySQL 5.6 order them by tid.
As an user, I want to be sure that my terms will be ordered they way I expect they are, probably by term name by default.
Allowed in 8.x beta?
According to https://www.drupal.org/core/beta-changes it could be allowed because it reduces fragility of the application and the impact is really minor as this would just be a one line change.
Proposed resolution
Explicitely add a default orderBy clause on the request retrieving the terms for the autocomple engine.
Remaining tasks
Task | Novice task? | Contributor instructions | Complete? |
---|---|---|---|
Create a patch | Instructions | done | |
Update the issue summary noting if allowed during the beta | Instructions | Done | |
Add automated tests | Instructions | Done in #3 | |
Review patch approach of fix and tests (and to ensure that it fixes the issue, stays within scope, is properly documented, and follows coding standards) | Instructions |
User interface changes
Terms retreived by an autocomplete field will always be filtered by name, no mater what are the specificities of the server on which the site is installed.
API changes
None