Posted by Damien Tournoud on July 1, 2008 at 1:35pm
7 followers
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | taxonomy.module |
| Category: | task |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (fixed) |
| Issue tags: | needs backport to D7, Novice |
Issue Summary
Vocabulary hierarchy was always changed to single after term edit. This been fixed in #762604: Taxonomy terms list broken, term add/edit forgets it's parent
But we still has no test for "flatness" and this issue fixes it with more clear/readable condition in code
To reproduce:
- Create a new vocabulary, on the term list page, you see "flat vocabulary"
- Add any term, on the term list page, the vocabulary type changed to "single hierarchy"
Expected behavior: the vocabulary type should stay in "flat vocabulary" as long as there is no parent/child relationship in the vocabulary.
Comments
#1
The issue comes from the identification of the root element. Here harmonized for consistency.
#2
This is a patch. Could use a test.
#3
The last submitted patch failed testing.
#4
Is this still an issue?
#5
Fix with test
EDIT: parent for [root] is not set #762604: Taxonomy terms list broken, term add/edit forgets it's parent
EDIT2: new issue about hierarchy #763380: Do not use taxonomy_get_tree() in taxonomy_overview_terms()
#6
Re-roll last patch suppose no need to wait debatable #763380: Do not use taxonomy_get_tree() in taxonomy_overview_terms()
#7
taxonomy.module hunk was lost
#8
Re-roll against current HEAD
#9
Seems this was fixed in #846524: Terms cannot be manually reordered by weight.
So patch still useful
- Adds a test
- isset() a bit faster then array_shift() + compare
#10
#11
I think this should be commited
#12
#8: 277200-detect-hierachy-type-d7.patch queued for re-testing.
#13
Sorry, I thought you said in #9 that the issue was fixed. Can we update the title and issue summary to reflect what the current patch is for?
#14
The last submitted patch, 277200-detect-hierachy-type-d7.patch, failed testing.
#15
re-roll for 7 & 8
#16
#15: 277200-detect-hierachy-type.patch queued for re-testing.
#17
The last submitted patch, 277200-detect-hierachy-type-d7.patch, failed testing.
#18
Re-rolled patch with test
EDIT: summary updated
#19
Attached merely removes
t()from the assertion message, which is not actually translated. Reference: http://drupal.org/simpletest-tutorial-drupal7#t#20
Ah, I understand now. So the current patch does not include any functional changes. Instead, it includes:
Patch looks good to me. Thanks @andypost for pushing this forward. :)
#21
Thanks, committed/pushed to 8.x, moving to 7.x for backport.
#22
Should be a simple backport.
#23
#24
Thanks @andypost!
#25
That's certainly much easier to read. and yay for tests.
Committed and pushed to 7.x. Thanks!
#26
Automatically closed -- issue fixed for 2 weeks with no activity.