Needs work
Project:
Drupal core
Version:
main
Component:
taxonomy.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Jun 2010 at 06:02 UTC
Updated:
25 Aug 2023 at 23:00 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
alexpottPatch attached to fix the issue
Comment #2
radicsge commentedComment #4
alexpott#1: 815682_term_order.patch queued for re-testing.
Comment #6
alexpottOld patch posted with unnecessary code :(
New patch attached to solve issue.
Comment #7
alexpottComment #8
xjmCross-referencing #941266: Order of terms with same weight messed up after saving and #394422: Taxonomy terms should be listed in order they are entered, which also relate to term ordering.
Comment #9
hass commentedComment #10
Niklas Fiekas commentedThanks @alexpott for the detailed steps to reproduce and the patch. The same seams to occur in Drupal 8. The policy is to get things into D8 first and then move the issue back to 7.x for backporting. Setting needs work for a reroll.
Note: If we can (by any chance) do the ordering on the database layer, that would be preferable.
Code review: Comments should always end with a
.and wrapped at 80 characters. The summary line of sorting callbacks would be like the example in http://drupal.org/node/1354#callbacks.Comment #11
marcingy commentedThis is not major
Comment #12
jthorson commentedHasn't been major for two years ... fail to see what has changed now, to make it so.
Comment #13
hass commentedAs nobody is working on this issue it seems to have a wrong priority. Highering priority to get the major bug fixed. It's not possible to order taxonomies, this is really major. I would like using critical, but it's not critical.
Comment #14
catchWhether or someone is working on an issue is not the measure of its priority, see http://drupal.org/node/45111 for what is.
Comment #15
ryan.ryan commentedI'm on it.
Comment #16
ryan.ryan commentedAttached is the patch. I tested the functionality and it worked.
Comment #18
jthorson commentedRe-rolled to apply against latest head. (Was the original rolled against D7, perhaps?)
Comment #19
dcam commented#18: 815682_term_order-reroll.patch queued for re-testing.
Comment #20
dcam commented#18 still applies to D8. After applying, taxonomy terms are displayed in node views by order of their weights in the admin term list page (tested with all three term widgets).
+1 for RTBC. It seems like a good idea to me, but hopefully a more experienced core contributor will check this since it's a UI change.
Comment #21
dcam commented#18: 815682_term_order-reroll.patch queued for re-testing.
Comment #23
kerasai commentedIs it not a benefit to have the flexibility to set an arbitrary order (delta as set by user) on the terms of a node/entity? I certainty think it is. Maybe some type of configuration to determine which behaviour is appropriate.
Comment #24
xjmLet's see if this is still reproducible in current D8. We also will need an automated test demonstrating the bug, if so.
Comment #25
Mandakini_Kumari commented#6: 815682_term_order.patch queued for re-testing.
Comment #26
xjm@Mandakini_Kumari, the patch you requeued was from 2010, before Drupal 7 was released, so there is no way it will work for Drupal 8. :) To see if this is reproducible in D8, we need to test it by hand in a Drupal 8 installation, and then the next step will be to code a new automated test covering the bug.
Comment #27
Mandakini_Kumari commented@xjm: Sure I will start working on it.
Comment #28
Mandakini_Kumari commentedI tested and found that it is reproducible in D8. Attached here is screen shot.

Comment #29
xjmThanks @Mandakini_Kumari!
Comment #30
alexpott@Mandakini_Kumari hmmm... seems like you've discovered a vocabulary ordering issue. The original issue is concerned with the ordering of taxonomy terms within a free tagging vocabulary.
Re-testing on Drupal 8 shows we are even more inconsistent!
In order to recreate this issue with a vanilla drupal standard install:
Comment #31
Mandakini_Kumari commentedI am wounding is there any relation between field weight of table taxonomy_term_data and Admin UI of admin/structure/taxonomy (Home >> Administration >> Structure) ?
Attached screen shot for both.
Field weight of table taxonomy_term_data having always 0 value but Admin UI shows taxonomy weight and sequence of display. In D6 both weight were synch. Please help me to understand
Comment #32
xjm@Mandakini_Kumari, the first screenshot shows the term data table, but the second screenshot shows the weight of vocabularies. These are two different things. For example you might have:
Vocabulary A -- weight 5
Vocabulary B -- weight 9
Comment #33
pwieck commentedremoving reroll tag
Comment #34
utilum commentedComment #35
utilum commentedCurrent behavior: Node view displays terms in the order entered on the node form. Weight changes in the vocabulary admin interface affect only the widget display; the order of terms in node view is not affected. However, if the widget is checkboxes or select list, opening the node edit form and saving without making any edits will enter terms sorted by weight, and therefore display them accordingly.
Does this require fixing?
If so, would someone help me lay out the desired behavior to test against?
Comment #35.0
utilum commentedChanging instructions for what to look for in Drupal 8. And removing drupal version references.
Comment #36
mgiffordComment #37
drupalfan2 commentedI had the same problem and this patch seems to solve the problem.
Is this patch
https://www.drupal.org/files/815682_term_order-reroll.patch
implemented in Drupal 7.41?
If not, why not?
Comment #40
ressaThis is still an issue in the latest release Drupal 8.2.2 - taxonomy terms seem to be sorted randomly, and not according to the order of the Term List page at
admin/structure/taxonomy/manage/tags/overview.Comment #47
tim corkerton commentedThis is still an issue with the latest Drupal 8.9.4. Experiencing the same behaviour as described.
Also Patch fails to apply
Comment #48
danflanagan8I wanted to pop in and point out that the contrib module Entity Reference Extensions can handle displaying the terms in a Taxonomy Reference field sorted by weight (or by any other property/field of the terms).
Comment #53
quietone commentedI tested this on Drupal 11.x, standard install and I was able to reproduce some of the problem
So the issue is now that when viewing a node, the order of the tags is not the same as the ordering of the vocabulary.
I am updating the steps to reproduce