When deleting a term, related translations in table i18n_taxonomy_term are not deleted.
The function i18n_taxonomy(), which implements the taxonomy hook, has a comment saying that $edit is an array. While it is true for most $op/$type combinations, in the case of term/delete $edit is a term object!
Thus, the issue can be fixed by replacing this code:
case 'term/delete':
db_query('DELETE FROM {i18n_taxonomy_term} WHERE tid=%d', $edit['tid']);
break;
with the following:
case 'term/delete':
db_query('DELETE FROM {i18n_taxonomy_term} WHERE tid=%d', <strong>$edit->tid</strong>);
break;
Some Drupal core inconsistency to look into?
Comments
Comment #1
jose reyero commentedYes, it seems like some inconsistency in the hook_taxonomy, which passes an object only on delete operations, but an array for the rest of the cases.
Fixed by now in i18n, thanks
Comment #2
(not verified) commented