Vocabulary: Location
Terms:
Angola
UK - England - London
UK - England - Dorset
UK - Wales - Ceredigion
USA - Dallas - Dallas County
USA - Florida - Palm Beach County
Settings: Save Deepest Term Only
Create node, select: UK - Wales - Ceredigion
go to edit node, term data correctly saved and showing UK - Wales - Ceredigion
Alter Settings: Save Term Lineage
edit node, select UK - Wales - Ceredigion, save, edit. Go to edit node, terms showing
Angola
go to edit, alter to UK - Wales - Ceredigion again, save...go to edit, terms showing:
Angola
I am using the terms to automatically write both my URLs and title so this is creating a mess on my test site. Every time a user edits a node, if they didn't put the terms back as they were before, the title, URL and terms would change on submission.
Comments
Comment #1
wim leersUhm, you first say that you're using "save deepest term only", but in the title you say "save term lineage". Which is it now?
Transitions from one to the other are *not* supported, because the changes needed (especially from "save deepest term only" to "save term lineage) cannot be predicted.
What you are describing, sounds like a bug though. I will try to reproduce.
Comment #2
esllou commentedIn my example, I start off with Save Deepest Term Only, to show that that's working as expected, then I add:
Alter Settings: Save Term LineageAlso, I don't believe this is "only" a transitional problem. If I change from one setting to the other, I'd expect to see an issue when I FIRST go to edit a node, but this is happening, as shown in my example, repeatedly. I quote from my first post:
Alter Settings: Save Term Lineage
edit node, select UK - Wales - Ceredigion, save, edit. Go to edit node, terms showing
Angola
go to edit, alter to UK - Wales - Ceredigion again, save...go to edit, terms showing:
Angola
Comment #3
wim leersI know this isn't just a transitional problem. I quote:
Comment #4
esllou commentedOK, let me know if you want a hand with any testing.
Comment #5
esllou commentedhaving upgraded to latest version of the .module file (1.80), I tried again:
I save a node as UK >> England >> London and when I go into the same node to edit it, the terms are showing as:
Angola >> London
which is not even a parent/child relationship that exists! Again, with "save only deepest term", there are no problems, only with "save term lineage".
Comment #6
wim leersIs this a "multiple parents" vocabulary?
Comment #7
wim leersAlso, please go to admin/settings/hierarchical_select/configs and export each different config. That makes it much easier to reproduce this. :)
Comment #8
esllou commentedIt is multiple hierarchy vocabulary.
Here is the export:
Comment #9
esllou commentedwere you able to reproduce this, Wim?
Comment #10
robin.com.au commentedI have an interest to see this problem solved.
I have a 3 level hierarchy: Country -> State -> City.
Eg. Australia -> Western Australia -> Perth
Choosing Save only the deepest term and Force the user to choose a term from the deepest level to force Perth to be chosen works fine.
However if I choose Save Term Lineage and Allow the user to choose a term from any level to have the ability to choose Western Australia without forcing to choose Perth, it doesn't work.
Whether you create new content or edit existing node, neither Western Australia nor Perth will stick, BUT Australia does.
And if I choose Save only the deepest term and Allow the user to choose a term from any level instead, no changes seems to happen.
And also I cannot understand the difference between Save lineage and Level Choice. It really sounds like the same thing to me and needs further clarification. Maybe a few examples with Country, State, City will help.
Thank you Wim,
Robin
Comment #11
esllou commented...and just to complete the four possible choices, my set up that isn't working is
Save Lineage and Force the user to choose a term from the deepest level
The difference as I understand it, between Level Choice and Save Lineage is this:
Save Lineage - If you save a node with Perth and this option selected, the $terms on that node will be Australia, Western Australia AND Perth. If it's not selected, only Perth would get chosen. This is the part of HS which seems most buggy and the choices don't stick on node/edit.
Level Choice - Will you allow your users to Select Australia or perhaps Western Australia, or do they have to choose from the deepest level, i.e. Perth.
If you combine the two, you could have a user select Australia, then Western Australia (not having to go to deepest level) and the $terms would come out as Australia and Western Australia.
Comment #12
wim leersI *think* this is a duplicate of http://drupal.org/node/258708. Please test and confirm. If that issue didn't fix it, then please mark this issue as active again, or I won't see it.
Comment #13
esllou commentedThe problem of the lineage not being saved when you go into node/edit seems to have gone away but now it seems to be interfering with my PathAuto settings. I have the URL for this nodetype to be:
city/[termpath-raw]/[field_city_name-raw]
and before, when I had HS configured to "save deepest term only", the URL was created like this:
city/united-states/texas/dallas-county/dallas
now I've switched to "save term lineage", they are coming out as:
city/united-states/dallas
only taking the highest level of the termpath. When I edit and save again, it corrects itself.
Comment #14
esllou commentedjust to confirm. Switched HS back to "Save only the deepest term" and the URLs are coming out right first time for newly created nodes - so the latest patch is doing something odd with the termpath.