For freetagging vocabularies i use Content Taxonomy Autocomplete (6.x-1.0-beta6) field to save terms.
In my content type i have 3 such fields - Region, Street and Index
Users often input street address wrong (for example "13 Avenue" and "13th Avenue") - so i want to merge "13 Avenue" into "13th Avenue". But when i merge term "13 Avenue" with "13th Avenue" in Street vocabulary - all other terms (Region and Index) in nodes becames empty!
Explain in detail
First i have such nodes:
title: Teddy Shop
Region: West
Street: 13 Avenue
Index: 31000
After merging:
title: Teddy Shop
Region:
Street:
Index:
What is the reason for such problem? Maybe - the using of Content Taxonomy Field inspite of direct assigning vocabulary to node?
| Comment | File | Size | Author |
|---|---|---|---|
| #21 | 402592_Make_Content_Taxonomy_Fields_compatible_with_Merge_feature.patch | 2.12 KB | darrell_ulm |
Comments
Comment #1
Eugene Fidelin commentedI find out that terms from other vocabularies disappears when module delete term which is still linked to node.
So module must first assign new merged term to node and then delete old unnecessary term
So if i want merge "13 Avenue" into "13th Avenue" then module must do in such order
1. Update all nodes and set "13th Avenue" where term is "13 Avenue"
2. Delete unnecessary term "13 Avenue"
Comment #2
Taras Zavaliy commentedI believe you're right – it's because of CCK Content Taxonomy Fields.
This would be a very useful feature, but implementation may not be straightforward...
(subscribing)
Comment #3
mh86 commentedyes, at the moment the Merge feature is not compatible with Content Taxonomy Fields!!
As far as I remember I pointed this out in the readme.txt
I'm planing to implement this, but can't tell you when I'm going to find time to implement this feature
Comment #4
mh86 commentedchanging title...
Comment #5
michellekim commentedAny progress on this yet?
(subscribing)
Comment #6
a_c_m commentedalso interested in this.
Comment #7
hefox commentedimplementating a hook as mentioned in a TODO should solve this if correctly implmentated them by content_taxonomy
ie
//TODO: add hook, so that other modules can consider changes
and then content_taxonomy could implement something like
(...with a much better 'cleanup' area, blerg).
Wouldn't that work?
Comment #8
benone commentedsubscribe
Comment #9
GregoryHeller commentedI just posted this issue over on content taxonomy module: http://drupal.org/node/665868
Comment #10
hefox commentedThis is also nice for when terms switch vocabularies so modules have a chance of responding to the switch; here's an example of it use http://foxinbox.org/drupal/code-snippits/switching-content-taxonomy-fiel... (haven't tested it too much).
I can make a patch for the hooks if the syntax is desirable.
Comment #11
Bilmar commentedsubscribing
Comment #12
mh86 commentedI committed both hooks for switching and merging to the taxonomy manager, as suggested by hefox (thanks for working on this issue!).
Implementations of these hooks by other modules, like the content taxonomy, are of course still missing, but at least it's possible from now on to react on the changes.
Comment #13
robby.smith commented+1 subscribing
Comment #14
pimousse98 commentedHas there been any progress in implementing the integration with Content Taxonomy?
Comment #15
pedrorestu commentedsuscribing.
it would be good this request.
Comment #16
brycesenz commentedSubscribing.
Comment #17
brycesenz commentedActually, after reading through the current taxonomy manager code and reading through hefox's awesome code, it seems that really all you have to do is to append this function at the bottom of "content_taxonomy.module":
You can optionally add the 'switch' case code that hefox also provided, if that's how you want your content taxonomy module to behave when terms switch vocabularies.
Comment #18
matuck commentedSubscribing.
Comment #19
ju.ri commentedJust tested the code in #17 and it works great! Thank you!
Comment #20
asb commentedMaybe if someone would roll a patch with the changes from #17, there'd be a slight chance to get this fixed and committed, almost 2.5 years after the initial feature request (just in case that someone still maintains
content_taxonomy.module)?Thank you!
Comment #21
darrell_ulm commentedHere is the patch rolled. Can anyone test?
Comment #22
asb commentedThanks, darrellulm!
Running the patch in #21 from within
./sites/all/modules/content_taxonomyagainst content_taxonomy-6.x-1.0-rc2 gives me:However, this is RC2, not one of the current "dev" releases (branches 6.x-2.x-dev or 6.x-1.x-dev), and probably I have a number of patches already applied.
Comment #23
darrell_ulm commentedDarned white-space, hmmmm, wonder if it can still apply.
Do you want me to re-roll this?
Thanks.
Comment #24
asb commentedThis is beyond me... Stackoverflow 1, Stackoverflow 2, Check for whitespace errors in diff. Yes, please reroll, if you can make any sense of those "whitespace errors".
Thank you!
Comment #25
darrell_ulm commentedOK, I'll roll for the 2 dev releases when I get caught up.
Comment #26
naero commentedThis did not work for me; it ended up deleting the value from the node altogether.
Comment #28
ivnish