Where: on the page www.example.com/admin/structure/taxonomy/
<vocabulary>
What happening: The buttons "Save" and "Reset to alphabetical" disappear if a taxonomy term has more than 1 parent
What is expected: Even with multiple relations, the buttons should still be there.
How to reproduce:
- add a new vocabulary in
/admin/structure/taxonomy
- add 2 or more parent terms
- add one child term
- edit the child term and holding
ctrl
select the 2 parent terms onRelations
at/taxonomy/term/3/edit?destination=admin/structure/taxonomy/
<vocabulary>
"Save"
and"Reset to alphabetical"
buttons disappeared from/admin/structure/taxonomy/auto_parts
The problem here is how to represent in the GUI a term having 2 or more parents? Changes in this interface are done by dragging and dropping terms in the list. The final result of how this list looks like is saved on the system.
I think the reason the system today hides the save button
is to avoid overriding the multiple parents of the terms. If there is a better way to visually represent this complex hierarchy then part of the problem is solved.
Apparently it cannot be solved without developing a graphical solution, as I've said on comment #10
The following image shows the screen with the buttons, before assigning more than one relation for a specific term.
Proposed resolution
- hold
CTRL
to drag terms to other parents, keeping the already existing parents. - highlight the multi-parented terms with a different color when hovered
- identify the multi-parented
term with text ("multi parented")in a visual way (which way?) - identify the multi-parented term its
term id
in order to better identify them across other parents - add a button or something else on the row of the term to allow deleting it from a selected parent.
- add an operation
release from other parents
to switch this term as single-parented to the nearest parent. (needs more discussion)
I made an image of this proposal:
Edit 1: Propoesed solution on comment #18
Edit 2:updated as of comment #19 and #20
Comment | File | Size | Author |
---|---|---|---|
#18 | core-multi_parented_taxonomy_terms_ux-1491406-18.JPG | 28.24 KB | Mac_Weber |
#4 | taxonomy-multiple-parents-1491406-4.patch | 1.11 KB | attheshow |
Comments
Comment #1
Mac_Weber CreditAttribution: Mac_Weber commentedI just figured out this is limited by the following conditional. What is the reason for limiting
$vocabulary->hierarchy
< 2
?Comment #2
attheshow CreditAttribution: attheshow commentedConfirmed. I was able to replicate this issue on Drupal 7.20.
Comment #3
attheshow CreditAttribution: attheshow commentedThis also breaks the ability to sort the list of terms via drag & drop for some reason. You can't reorder terms when one of your terms has two parents.
Comment #4
attheshow CreditAttribution: attheshow commentedI made a patch for this since it's unclear what the reasoning behind the < 2 code is on the hierarchy.
Comment #5
attheshow CreditAttribution: attheshow commentedComment #6
askibinski CreditAttribution: askibinski commentedI have this issue and tested the patch on a long (multiple page) hierachical taxonomy list.
The buttons re-appeared, but saving the page throws a fatal error:
I'm not entirely sure if this is caused by the patch (I can't save it without the patch so difficult to test)
Comment #7
josh@pixael.com CreditAttribution: josh@pixael.com commentedGuys same problem here. Changed priority to major because I can't change terms order anymore...
I applied the patch but got same error of #6 when saving.
Comment #8
josh@pixael.com CreditAttribution: josh@pixael.com commentedchanged to 7.22
Comment #9
Jooblay.net CreditAttribution: Jooblay.net commentedCould this be theme related? It looks like your on Seven?
Comment #10
Mac_Weber CreditAttribution: Mac_Weber commented@j0sh bug reports must be done against the dev version.
@leseeen this is not theme related, it is on drupal core.
IIRC it can be saved if you edit each single term separated. You cannot do batch updates on this list.
The problem here is how to represent in the GUI a term having 2 or more parents? Changes in this interface are done by dragging and dropping terms in the list. The final result of how this list looks like is saved on the system.
I think the reason the system today hides the
save button
is to avoid overriding the multiple parents of the terms. If there is a better way to visually represent this complex hierarchy then part of the problem is solved.Comment #11
Anonymous (not verified) CreditAttribution: Anonymous commentedSubscribe
Comment #12
Anonymous (not verified) CreditAttribution: Anonymous commentedSubscribe
Comment #13
Mac_Weber CreditAttribution: Mac_Weber commentedComment #14
Media Crumb CreditAttribution: Media Crumb commentedwas this ever fixed?
Comment #15
Mac_Weber CreditAttribution: Mac_Weber commented@Media Crumb, apparently it cannot be solved without developing a graphical solution, as I've said on comment #10
Comment #16
PanchoOn D8 the UI seems broken anyway, but this aspect still applies.
We could say "By design", but then it could still be improved or at least explained by a status message.
So moving to D8, our current dev branch.
Comment #17
PanchoProbably should be backported.
Comment #18
Mac_Weber CreditAttribution: Mac_Weber commentedI have a solution proposal:
CTRL
to drag terms to other parents, keeping the already existing parents.term id
in order to better identify them across other parentsrelease from other parents
to switch this term as single-parented to the nearest parent.I made an image of this proposal:
Comment #19
PanchoThanks for the cool sketch of your idea!
What I intuitively like about it is the CTRL + drag'n'drop feature that matches how items are copied in most file browsers and many other OS interfaces.
Some might say however that should only be used for copying items and we're basically creating something like a new instance of the child term. CTRL+SHIFT might be an alternative as it's being used for creating links which more closely matches what we're doing here.
However, I'm not sure our current tabledrag supprots this or can be easily tweaked. There's been some moves to #1524414: Rewrite tabledrag.js to use jQuery UI but that seemingly didn't work out well. We'd need to see how it can be made possible.
The "release other parents" link however is unintuitive and very much irritating. Why would you click on some button in one row to make things change in other rows? Rather we should support dragging the "instance" out of the table to remove it from a parent.
And the "multi parented" indicator isn't so nice either. We might want to add "(parent: Parent B)" to it.
Also, not all multi-parented terms should be colored. If you have several of them, this would make it harder to grasp, not easier. We should better only highlight other instances of the same term if one instance is hovered or even grabbed.
Otherwise this UI-wise looks like a major improvement, given we can make it work.
But first of all let me get the basics:
Comment #20
Mac_Weber CreditAttribution: Mac_Weber commented@pancho
I'm not sure, but I still think we need to provide a way to remove from that single parent, and also to make the term attached only to a chosen parent in an easy way.
I also changed my mind right after posting. However, displaying like you said is not a good option, too. Imagine a term with 3 or more parents... we don't want all the names there. We need to develop this idea of a visual indicator.
I had the same idea later! =D
Comment #20.0
Mac_Weber CreditAttribution: Mac_Weber commentedPdd propoesed solution on comment #18.
Improve problem description.
Comment #21
PanchoThis would be just to make it even easier, right? I think we shouldn't do that anyway. It seems like an edge case. Also, even if other instances are highlighted, there might be more of them on the next pages, so more instances might be removed than the user knew about. Also, for single click operations, we have to provide a confirmation message. It would be much easier in this case to go to the edit page and reparent the term.
For quick, minor changes the visual support would be nice, however.
Not a problem. My proposal was:
It scales up to any number of parents. That way, when dragging an instance somewhere else, the user would also know where the item was dragged from:
An intuitive visual indicator would probably be even nicer, but shouldn't hold us up to much at this point.
Central question is: can we do it with current tabledrag.js, or what would we have to do to make it work. I'm not sure I will find time to figure this out in the next days, but if you'd find out something that'd be nice, and otherwise just ping me, so this doesn't get lost somewhere in the huge issue queue.
I can remember that some years ago I was unhappy with drag'n'drop being disabled here, so I'm really interested in getting this improved as much as possible.
Comment #22
Mac_Weber CreditAttribution: Mac_Weber commented@Pancho I don't see any reason for using
help
. There are some instructions on this page already about dragging the items. We just need to add this part of dragging with multi-hierarchy.I don't think I understand your example... In my image there is the term
Child 2
being used by 2 different parents, then it is displayed under both parents. In your example you are listing only the original parent and you are not displaying a "copy" of the term under the original parent. If it has 3 parents it will display only the original parent name and only under the last parent?I don't know the answer for your question about
tabledrag.js
.Comment #23
PanchoThe existing instructions on the page are provided by the help module. But yes, as I said, we shouldn't rely on the help module being enabled.
"just" is good... ;)
??? No, I'm not.
Isn't it obvious that "Tree" is listed under both of its parent terms, "Green" and "Large". And after the latter instance gets dragged to "Old", it's displayed there.
Comment #24
Media Crumb CreditAttribution: Media Crumb commentedSorry if this sounds dense, but even if it is a graphical issue, is there a way to solve it currently without using the admin area? I have a giant list of terms with several parents. I'd like to be able to sort all those terms into 1 parent in Alphabetical order. I don't mind playing around with the code. I guess I'm just looking for a solution in the short term.
Comment #24.0
Media Crumb CreditAttribution: Media Crumb commentedupdated as of comment #20
Comment #31
adanielyan CreditAttribution: adanielyan commentedThis thread seems to be abandoned, but I'd like to resurrect it as the problem still exists. Was anyone able to find a solution/workaround for this?