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.

CommentFileSizeAuthor
#1 taxonomy_menu_term_delete.patch746 bytesigor.ro

Comments

igor.ro’s picture

StatusFileSize
new746 bytes
asak’s picture

subscribing.

indytechcook’s picture

Status: Needs review » Reviewed & tested by the community

Good 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.

indytechcook’s picture

Status: Reviewed & tested by the community » Needs review
hanoii’s picture

Got 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.

indytechcook’s picture

Status: Needs review » Reviewed & tested by the community

setting to rtbc until release is created.

indytechcook’s picture

Status: Reviewed & tested by the community » Fixed

Added to 2.4-beta1.

Status: Fixed » Closed (fixed)

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