Imagine the following scenario:

In a free tagging field, use a issue comment to add a term to the node. Unfortunately, the term is misspelled (e.g. "friuts").
Use the next comment to correct the term, so we have:
-friuts +fruits (both are links).
An admin comes along and uses the taxonomy admin interface to delete the superfluous term "friuts".
Now, the issue does not have any mention of the previous term. It has: +fruits.

Maybe it's not a bug and it was the expected behavior.

I would have expected the misspelled term to remain thus:
-friuts +fruits (the second one only has a link).

Obviously, it's a minor issue. I can't think of a reasonably scenario where this loss of data would be really troublesome.

Comments

aclight’s picture

Status: Active » Closed (works as designed)

This is basically what happens now with project issue metadata, and I don't think there's any way around this. CAT stores term ids in the tables it creates for each node/comment pair, so if later an admin deletes that term (and thus the tid for the term no longer exists in {term_data}), how could CAT later display the misspelled term?

In the D6 version (which at the moment is not even on the table) this might be possible, since terms are revisioned in a similar way to nodes, but this fact is going to make CAT even more complicated, I'm afraid.

If you have a suggestion about how this could be done without storing the actual term name itself, feel free to set the status back. But I don't think it's possible without essentially keeping our own version of the {term_data} and possibly other tables.

beginner’s picture

Version: » 5.x-1.x-dev
aclight’s picture

Nope, #314335: Respond to deletion of terms just deletes the row from the {comment_alter_taxonomy} table which, before that patch was committed, would still have remained even if the term contained in the row was no longer in the {term_data} table.

As I mentioned in comment #1, comment_alter_taxonomy isn't storing the name of the term anywhere, so if that term has been deleted from the {term_data} table there would be no way to display the name of the former term, linked or not. That is, unless I create another table for cat where it stored information about deleted terms, but I'm not planning to do that because that subverts the entire taxonomy system.