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.

Comments

kaizerking’s picture

EDIT: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

stBorchert’s picture

Status:Active» Postponed (maintainer needs more info)

f it is saving then a display lineage option would be great

The 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.

after saving the field, again when we edit we get the parent term None it means the lineage is not saved

Please provide more details on how to reproduce this (for example which version, the structure of your taxonomy, ...).

kaizerking’s picture

StatusFileSize
new4.03 KB
new1.34 KB

I 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

stBorchert’s picture

Status:Postponed (maintainer needs more info)» Needs review

I'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!)

kaizerking’s picture

Great!!!
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

kervi’s picture

StatusFileSize
new12.15 KB

Hi! 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
1
field cardinality is set to unlimited

2. after change cardinality to 1, only first term appears on node edit form.

any solution?

stBorchert’s picture

Version:7.x-1.x-dev» 7.x-1.3
Status:Needs review» Fixed

Display 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.

stBorchert’s picture

Status:Fixed» Closed (fixed)
Strycker’s picture

Version:7.x-1.3» 7.x-1.x-dev
Assigned:Unassigned» Strycker
Status:Closed (fixed)» Active

Hi!

Is it possible to implement saving lineage of chosen terms rather than saving deepest term, like now? It would be very usefull feature.

stBorchert’s picture

Status:Active» Closed (fixed)

No, 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.

dgtlmoon’s picture

Status:Closed (fixed)» Needs work
StatusFileSize
new1.82 KB

Supplied 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.

stBorchert’s picture

Status:Needs work» Closed (fixed)

I'm sory to say this again, but Simple hierarchical select will not save the complete term lineage. Even if it it possible somehow.

dgtlmoon’s picture

But 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

kumkum29’s picture

Hello,

i tested this patch (https://drupal.org/comment/reply/1893188/7499236#comment-7497654) and get errors in admin page :

Warning : Missing argument 5 for shs_field_attach_submit(), called in /srv/data/web/vhosts/www.domain.com/htdocs/modules/field/field.attach.inc on line 898 and defined in shs_field_attach_submit() (line 969 dans /srv/data/web/vhosts/www.domain.com/htdocs/sites/all/modules/shs/shs.module).

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.

kumkum29’s picture

Hello,

Have you found a solution for this warning error?

I use php 5.4.

Thanks.

Liliplanet’s picture

You 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

kumkum29’s picture

Hello,

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.

lcampanis’s picture

Hi,

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 :)

TanvirAhmad’s picture

TanvirAhmad’s picture

Status:Closed (fixed)» Needs work

Seeing #14

stBorchert’s picture

Assigned:Strycker» Unassigned
Status:Needs work» Closed (fixed)

Closing this issue and repeating myself for the last time: SHS is not designed to and will never save the complete lineage.

TanvirAhmad’s picture

StatusFileSize
new1.73 KB

Just removed the 5th argument to fix #14. Its working for me.

TanvirAhmad’s picture

@stBorchert its saving complete lineage in my case.

TanvirAhmad’s picture

A 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.

TanvirAhmad’s picture

StatusFileSize
new2.22 KB

If you are using EntityRef and want to save linage from Parent to Child, this is the one you are looking for.

kumkum29’s picture

Hello,

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.

Artemrrr’s picture

Patches do not work, 100%
parent is in the preview, but not on the page..?

tdh3abood’s picture

@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? :/

Artemrrr’s picture

tdh3abood
Try another patch, the error will disappear, but the parent still will not be translated on the page!

all the patches do not work!

yenidem’s picture

@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.

yenidem’s picture

Status:Closed (fixed)» Needs work

does not work if multiselection enabled.

stBorchert’s picture

Status:Needs work» Closed (fixed)
diogo_plta’s picture

Will 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.

jonloh’s picture

+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.

marcoka’s picture

an 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.

pareen’s picture

Any chance that this is going to be done?

ah_ma81’s picture

It 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

PlayfulWolf’s picture

Accidentally 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...)

marcoka’s picture

yep tested that module. works great.
but also see my issue #2288295: Updating existing fields

valepu’s picture

Patch #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)

PlayfulWolf’s picture

Did 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...

ah_ma81’s picture

Solution ... 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.

PlayfulWolf’s picture

I 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