Posted by HnLn on June 22, 2009 at 12:45pm
| Project: | Taxonomy Access Control |
| Version: | 5.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | xjm |
| Status: | closed (fixed) |
Issue Summary
This is also reported for 5.x, but not for 6.x, so I'll add it here.
Problem occurs for me when I delete a node that has a custom hook that uses taxonomy_del_term to delete the term that is linked to that node. Hence it calls hook_taxonomy but cause of a missing include I guess results in above error.
Regards,
HnLn
Comments
#1
Looks like there are several TAC module functions in in the admin.inc file that should be moved to the module file; in fact, I'd say everything from line 341 on. Does anyone have a reason that these functions should not be moved to the main module file?
#2
Here's a patch that simply moves those functions over.
NB: patch is rolled at the directory level; use the -p option.
#3
#4
I would roll lines from lines 428.
I would leave functions 'taxonomy_access_defaults_update' and 'taxonomy_access_grants_update' in admin section, because these functions update the settings (database values) from the admin UI. These are not used by other hooks, and are not intented for API functions like 'taxonomy_access_get_grants'.
XJM: Please mark it 'to be ported' if you agree.
#5
Alright, looks good to me. :)
#6
Patch is commited. Thanks for xjm.
#7
We should backport this to D5. I will make a patch
Marked #338891: Line 260: Call to undefined function _taxonomy_access_get_nodes_for_term() as a duplicate.
#8
Here is the patch for the 5.x branch (against 5.x-2.x-dev).
#9
Tested #8 with 5.x-2.x-dev; works fine.
#10
#8 committed to 5.x-2.x-dev.
#11
Automatically closed -- issue fixed for 2 weeks with no activity.