Reported by batje on #883090-2: Fix caching in data_taxonomy_get_info(). I copy verbatim:

[...] changing

db_query("DELETE dt FROM {data_taxonomy} dt JOIN {term_data} td ON dt.tid = td.tid WHERE td.vid = %d", $vid);

in the data_taxonomy_data_update function to

db_query("DELETE dt FROM {data_taxonomy} dt WHERE dt.id = %d AND data_table_name = '%s'", $id, $table_name);

prevents all data + terms links from a dictionary being deleted when you update 1 data record.

CommentFileSizeAuthor
#1 925390-1_limit_deletion.patch4.13 KBalex_b

Comments

alex_b’s picture

Priority: Normal » Major
Status: Active » Needs review
StatusFileSize
new4.13 KB

This patch fixes the above problem by actually using the existing _data_taxonomy_save_relations() function that does not suffer from the reported bug. It also prefixes data_taxonomy_save_relations() with an underscore to denote that it is an internal function, and it renames _data_taxonomy_insert_terms() to the more appropriate _data_taxonomy_save_terms().

Setting to major as updating data taxonomy records is effectively broken now.

batje’s picture

subscribe :-)

infojunkie’s picture

Status: Needs review » Reviewed & tested by the community

Works for me!

batje’s picture

We applied this to managing news. We had the issue when we changed the default Feed Import to overwrite items. It would delete all taxonomy terms from the system, except one, when importing a feed.

After applying this path, that issue has been resolved.

I'd suggest you commit this (and into MN as well)

joachim’s picture

Status: Reviewed & tested by the community » Fixed

Patch committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.