Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
entity_reference.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
22 Jan 2015 at 21:32 UTC
Updated:
17 Aug 2015 at 07:39 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
ifrikComment #2
berdirThis is because the selection plugin is using taxonom_get_tree(), which can only do that. There is no other way to display a term hierarchy.
A quickfix would be to hide the sort option for term references, a more complete fix to make that behavior configurable.
Comment #3
amateescu commentedI think we need to go with the simple fix for 8.0.x and maybe look into adding support for sorting
\Drupal\taxonomy\TermStorageInterface::loadTree()in 8.1.x.Comment #4
jibranI like #3 but can we let user know about this behavior? Something like, "Terms are only sorted by their weight" as a markup.
Maybe create a followup and add a link here in comments.
Comment #5
amateescu commented@jibran, why do you think that adding that piece of #markup in there will help users? They have no way to act upon it anyway, so IMO it will be just confusing.
Comment #6
jibranI agree it's TMI.
Comment #7
claudiu.cristea@amateescu,
Shouldn't we fill an issue for that? :)
Comment #8
alexpottCan this bug be tested?
Comment #9
amateescu commentedHm.. that's tricky to answer. The current patch just removed the sort option from the UI, so all we can test is that it doesn't show up anymore.
However, if we wanted to take the other route and add sorting capability to
\Drupal\taxonomy\TermStorageInterface::loadTree(), that should definitely be tested.Comment #10
amateescu commentedGiven that the taxonomy reference field doesn't have any sort either, this is not a regression for #1847596: Remove Taxonomy term reference field in favor of Entity reference, and asserting that a select element is not visible in the UI is not really helpful if we can't pair it with a positive assertion on the same xpath :)
Comment #11
amateescu commentedThis is the pre-existing issue that we can use for adding sorting capability to the taxonomy selection plugin: #2372225: Add sort setting for taxonomy term autocomplete results
Comment #12
alexpottThis issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 8dbdbd7 and pushed to 8.0.x. Thanks!
Comment #15
duaelfrThere is an open discussion about that setting in #2372225-13: Add sort setting for taxonomy term autocomplete results