Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
can we have option to save lineage? i don't know if it saving and only displaying deepest term
if it is saving then a display lineage option would be great
if not then we need this feature
1A->b>c and option to show top to bottom or bottom to top
ex: if we use it for country>state/region>city
2.We should be able to display it in city>state/region>country order almost all the sites need this
3.lineage terms display option either inline or one below the other with these option this would be a complete module
currently it shows only deepest term after saving.
Comment | File | Size | Author |
---|---|---|---|
#25 | 1893188-saveLineage-entityRef.patch | 2.22 KB | TanvirAhmad |
#22 | 1893188-saveLinage-remove-arg-5.patch | 1.73 KB | TanvirAhmad |
#11 | 1893188-save-lineage.patch | 1.82 KB | dgtlmoon |
#6 | test1.png | 12.15 KB | dgastudio |
#3 | display.PNG | 1.34 KB | kaizerking |
Comments
Comment #1
kaizerking CreditAttribution: kaizerking commentedEDIT:the screen shot attached with my last post, , after saving the field, again when we edit we get the parent term None it means the lineage is not saved
Comment #2
stBorchertThe selected term in the rightmost dropdown is saved. If you would like to display the hierarchy simply go to "Manage display" at your content type settings and select "Simple hierarchy" as format.
Other output formats are possible using Custom formatters or implementing hook_field_formatter_info() in a custom module.
Please provide more details on how to reproduce this (for example which version, the structure of your taxonomy, ...).
Comment #3
kaizerking CreditAttribution: kaizerking commentedI will try with custom formatters
My Structure is three level
SAP
- SAP R/3
-- SAP MM
-- SAP PS
After selecting the display "Simple hierarchy" i got this result, it shows only the lat two levels.
and the same field when we want to edit you get field as shown in the shs_edit_page
Comment #4
stBorchertI've updated the code.
Please test with the latest development version ("7.x-1.2+1-dev" should be available soon).
(btw.: thanks for testing!)
Comment #5
kaizerking CreditAttribution: kaizerking commentedGreat!!!
Sorry for not mentioning the version in your last post. just overlooked.
i git clone or directly download snapshot from the git, So that I get the latest as you work on that and commit.
It is good now, Thanks for giving this module to the community,
As of now front end is working good
Needs to test the backend,, i.e how this works with views, rules, flag etc they are the modules currently i am using to put these terms in flow.
Thanks again for the great work
Comment #6
dgastudio CreditAttribution: dgastudio commentedHi! i have tried both version ,latest dev from http://drupal.org/node/1892316 and latest dev from git clone..
but i still have the problem with the lineage...
look, i already have a lot of nodes created with the help of HS and save lineage option.
now, i want to use your module, but..
1. after simple change widget, the node edit form looks like
field cardinality is set to unlimited
2. after change cardinality to 1, only first term appears on node edit form.
any solution?
Comment #7
stBorchertDisplay of hierarchy works not as it should so setting this to fixed.
@kervi: please don't hijack this issue.
I don't know exactly how Hierarchical Select stores its data but it seems not to be compatible with Simple hierarchical select. Simply changing the field or widget type does not migrate the data. You have to create a script that transforms the data from HS to the correct format.
By changing the cardinality to 1 you deleted all the data of the additional items so only the first item is left.
Simple hierarchical select will not provide an upgrade path or a migration from Hierarchical Select so this is no issue of this module.
Comment #8
stBorchertComment #9
Strycker CreditAttribution: Strycker commentedHi!
Is it possible to implement saving lineage of chosen terms rather than saving deepest term, like now? It would be very usefull feature.
Comment #10
stBorchertNo, Simple hierarchical select will not save the complete lineage. You can display the hierarchy using the provided formatter, but saving all items in the hierarchy is not (and will never be) the purpose of Simple hierarchical select.
Comment #11
dgtlmoon CreditAttribution: dgtlmoon commentedSupplied is a patch, sorry to open this again, but I guess there is probably some confusion between using this as a formatter and using this a field widget? anyway, patch supplied to provide an extra widget setting to save lineage.
Comment #12
stBorchertI'm sory to say this again, but Simple hierarchical select will not save the complete term lineage. Even if it it possible somehow.
Comment #13
dgtlmoon CreditAttribution: dgtlmoon commentedBut there is "create new terms" and "node count" which are just extra features too, however I guess something like saving lineage might have a bunch of knock-on effects that cant be anticipated yet
Comment #14
kumkum29 CreditAttribution: kumkum29 commentedHello,
i tested this patch (https://drupal.org/comment/reply/1893188/7499236#comment-7497654) and get errors in admin page :
Also, parent terms are not always register as term with the content.
How to fix this?
This option would be really interesting with this module.
Thanks.
Comment #15
kumkum29 CreditAttribution: kumkum29 commentedHello,
Have you found a solution for this warning error?
I use php 5.4.
Thanks.
Comment #16
Liliplanet CreditAttribution: Liliplanet commentedYou are able to display the parent terms in your /taxonomy/term/% pages by ..
Select 'Advanced'
Select 'Content: Has taxonomy term ID (with depth)'
Set your 'Depth' higher than 1
Comment #17
kumkum29 CreditAttribution: kumkum29 commentedHello,
i get this error in the node admin page not in a view.
I this node admin page a have a taxonomy field (with widget shs) included in a field collection.
PS. i have resolved this issue with the last dev version.
Comment #18
lcampanis CreditAttribution: lcampanis commentedHi,
I would like to back up this feature.
The problem is that people are starting to dump the HS module, due to the fact that it's heavy, and extremely slow with large amounts of data.
I will sit and write this script now, as I need to migrate from HS to SHS.
Has anyone spotted a script for migration out there that does the job? If not, I'll provide one when done :)
Comment #19
TanvirAhmad CreditAttribution: TanvirAhmad commentedSeeing Same as https://drupal.org/comment/7681045#comment-7681045
Comment #20
TanvirAhmad CreditAttribution: TanvirAhmad commentedSeeing #14
Comment #21
stBorchertClosing this issue and repeating myself for the last time: SHS is not designed to and will never save the complete lineage.
Comment #22
TanvirAhmad CreditAttribution: TanvirAhmad commentedJust removed the 5th argument to fix #14. Its working for me.
Comment #23
TanvirAhmad CreditAttribution: TanvirAhmad commented@stBorchert its saving complete lineage in my case.
Comment #24
TanvirAhmad CreditAttribution: TanvirAhmad commentedA bit more clarification how it is working for me.
Actually I am trying to use token to Auto Node title. Before that patch, it was not possible for me but now its working.
And yes, in node display field, its not working.
Comment #25
TanvirAhmad CreditAttribution: TanvirAhmad commentedIf you are using EntityRef and want to save linage from Parent to Child, this is the one you are looking for.
Comment #26
kumkum29 CreditAttribution: kumkum29 commentedHello,
save lineage is a great option for this module. It is interesting that people have the choice to use or not this option. In some cases it is necessary.
This feature will it be included in the next version of shs?
Thanks.
Comment #27
Artemrrr CreditAttribution: Artemrrr commentedPatches do not work, 100%
parent is in the preview, but not on the page..?
Comment #28
Abdallah Qoraan CreditAttribution: Abdallah Qoraan commented@TanvirAhmad
i applied the patch and now i have an error :
"Notice: Undefined index: save_lineage in shs_field_attach_submit() ........"
did i do anything wrong? :/
Comment #29
Artemrrr CreditAttribution: Artemrrr commentedtdh3abood
Try another patch, the error will disappear, but the parent still will not be translated on the page!
all the patches do not work!
Comment #30
yenidem CreditAttribution: yenidem commented@TanvirAhmad
I applied patch#22, it worked but not works completely. I use multiple select of this field, it working only first field selection. the second field selecting only deepest term, parent term not selecting.
Comment #31
yenidem CreditAttribution: yenidem commenteddoes not work if multiselection enabled.
Comment #32
stBorchert@see #1893188-21: Save lineage
Comment #33
diogo_plta CreditAttribution: diogo_plta commentedWill be nice know the reason to don't apply this feature.
The path #22 works well, this feature is very powerful to organize the content. And the SHS is very more fast than HS.
Can we make this feature like a hook?
Please stBorchert, can you explain why do you disagree with this feature? Can you suggest another way to apply this feature?
Thank you.
Comment #34
jonloh CreditAttribution: jonloh commented+1 for save lineage feature. Although with Views you can filter with "Has taxonomy term ID (with depth)", I usually find that query filter pretty expensive. With save lineage, it's much easier for query to just load the deepest term. If you want load the parent instead, just load the parent term, instead of traversing down and looking for the rest.
Comment #35
marcoka CreditAttribution: marcoka commentedan example where you will run into problems is if you use facet api and tag nodes with shs. you will then not be able to choose like manufacturer and then model number. you will always just have the model number as its the deepest level.
Comment #36
pareen CreditAttribution: pareen commentedAny chance that this is going to be done?
Comment #37
ah_ma81 CreditAttribution: ah_ma81 commentedIt is really very important option, specially if you want to use views filter or another search like facet, like in comment 35.
I hope it will be applied soon to the dev or a new version of shs
Comment #38
PlayfulWolf CreditAttribution: PlayfulWolf commentedAccidentally found Taxonomy Set Lineage which does save all the lineage and it seems to work with SHS field (only 15min of testing done at the time of writing...)
Comment #39
marcoka CreditAttribution: marcoka commentedyep tested that module. works great.
but also see my issue #2288295: Updating existing fields
Comment #40
valepu CreditAttribution: valepu commentedPatch #22 will cause issues if you select "Force selection of deepest level" because when trying to save a node whose lineage has been saved (which means there will be some terms not from the deepest level)
Comment #41
PlayfulWolf CreditAttribution: PlayfulWolf commentedDid anyone found working solution to use any of 3 available hierarchical select modules and got lineage saved consistently?
I am in a stage to use two taxonomy fields and saving parent in the other field with the help of Rules...
Comment #42
ah_ma81 CreditAttribution: ah_ma81 commentedSolution ... Depended on comment #34
Usually shs is used with (term reference field) ... so in views instead of using ( Content: field lable (field_label) ... use ( Content: Has taxonomy terms (with depth) ) and set the depth for example to 3 or 5 ... depnding on how many child terms in your taxonomy.
That is how you do it in views:
1-go to views.
2-go to (Filter criteria).
3- click on (Add).
4- choose ( Content: Has taxonomy terms (with depth) ).
5-(Apply (all displays)).
6-Choose from the list which (Vocabulary) you want.
7-Choose (Selection type).
8-Set the (Depth) for example to 5 .. that is the most important step.
9-Apply and continue.
10-Configure filter criterion normally like what you want.
and you are done.
I hop i explained it clearly.
Comment #43
PlayfulWolf CreditAttribution: PlayfulWolf commentedI do use terms in some "similar by terms" system, where every term counts, even the parent one, so it is not something related to Views or Facets. Parent term (if available) has to be in there.
It may be possible to add another relationship in that particular view, that would be 3th there and I doubt that it will work
Comment #44
davidwhthomas CreditAttribution: davidwhthomas commentedJust noting for those looking for the save lineage feature in Drupal 8, you can find the patch here: https://www.drupal.org/project/shs/issues/2943357
Comment #45
Summit CreditAttribution: Summit commentedHi,
Can may be someone build the 'save lineage feature' in SHS D7, like https://www.drupal.org/project/shs/issues/2943357?
It is not working correct (anymore) in HS, and it is a necessary feature! I know this module was from start not build for this, but what are the alternatives?
Thanks a lot in advance for your reply.
Greetings, Martijn