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

dddave’s picture

nico24’s picture

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

dddave’s picture

How about providing a patch for this? Is this an issue in D7 (guess not due to the changes made to the taxonomy system)?

chaps2’s picture

Status: Active » Closed (duplicate)

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