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.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | 925390-1_limit_deletion.patch | 4.13 KB | alex_b |
Comments
Comment #1
alex_b commentedThis 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.
Comment #2
batje commentedsubscribe :-)
Comment #3
infojunkieWorks for me!
Comment #4
batje commentedWe 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)
Comment #5
joachim commentedPatch committed.