Closed (duplicate)
Project:
Drupal core
Version:
6.16
Component:
taxonomy.module
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
21 Mar 2010 at 07:19 UTC
Updated:
10 Nov 2010 at 14:00 UTC
There is a bug in taxonomy_overview_terms_submit which means that all synonyms of changed terms are lost when term weights are changed.
This is because taxonomy_get_tree does not load the synonyms, but taxonomy_save_term clears all synonyms before saving because it expects them in the argument
The least intrusive fix is to load the synonyms into the term object just before re-saving the term.
So add a line before taxonomy_save_term (taxonomy.admin.inc, 524):
$term['synonyms'] = implode("\n", taxonomy_get_synonyms($term['tid']));
Comments
Comment #1
dddave commentedMarked #748426: synonyms lost when terms are re-weighted as a dup.
Comment #2
nico24 commentedThis is also for relations.
Because I don't like hacking into the core.. I made my own module to fix it. What it does it alters the form taxonomy-overview-terms to change the submit function. Then I copy pasted taxonomy_overview_terms_submit() and changed the taxonomy_save_term() line to use my own taxonomy_save_term(). And this function taxonomy_save_term() is also copy pasted with the term_relation and term_synonym parts removed.
Comment #3
dddave commentedHow about providing a patch for this? Is this an issue in D7 (guess not due to the changes made to the taxonomy system)?
Comment #4
chaps2 commentedMarking as duplicate of #251255: Taxonomy term synonyms and relations clear after re-ordering using drag-and-drop feature. For a fix, see the patch posted in comment #52 there.