When we delete term from vocabulary used for menu and have enabled module 'locale' we get errors.
Problem is in taxonomy menu.
Implemention of hook_taxonomy invoke hook hook taxonomy_menu_$op, where $op is operation we get on hook_taxonomy.
Example taxonomy_menu_taxonomy_menu_delete.
Problem is that when it invokes taxonomy_menu_taxonomy_menu_insert or taxonomy_menu_taxonomy_menu_update this functions returns term object as a result. But taxonomy_menu_taxonomy_menu_delete does not.
So next code fails.
//here we invoke taxonomy_menu_taxonomy_menu_delete
$item = module_invoke_all('taxonomy_menu_'. $op, $item);
// Here $item is empty so _taxonomy_menu_save fails.
return _taxonomy_menu_save($item);
I create a patch for this.
Thanks.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | taxonomy_menu_term_delete.patch | 746 bytes | igor.ro |
Comments
Comment #1
igor.ro commentedComment #2
asak commentedsubscribing.
Comment #3
indytechcook commentedGood fix. This has been on my back burner for a while. This will fix several other issues.
I committed this to the D6-2 branch.
Comment #4
indytechcook commentedComment #5
hanoiiGot here by looking for some similar error, tried the patch and it worked. Maybe the status of this issue should be changed to fixed? If another review was needed, I found it working just fine.
Comment #6
indytechcook commentedsetting to rtbc until release is created.
Comment #7
indytechcook commentedAdded to 2.4-beta1.