Download & Extend

Call to undefined function _taxonomy_access_get_nodes_for_term() on taxonomy_access.module on line 253

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.

AttachmentSizeStatusTest resultOperations
taxonomy_access-498584-2.patch14.67 KBIgnored: Check issue status.NoneNone

#3

Status:active» needs review

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

AttachmentSizeStatusTest resultOperations
tac_498584.patch10.1 KBIgnored: Check issue status.NoneNone

#5

Status:needs review» patch (to be ported)

Alright, looks good to me. :)

#6

Status:patch (to be ported)» fixed

Patch is commited. Thanks for xjm.

#7

Assigned to:Anonymous» xjm
Status:fixed» patch (to be ported)

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

Version:6.x-1.0» 5.x-2.x-dev

Here is the patch for the 5.x branch (against 5.x-2.x-dev).

AttachmentSizeStatusTest resultOperations
tac_498584_d5.patch9.76 KBIgnored: Check issue status.NoneNone

#9

Tested #8 with 5.x-2.x-dev; works fine.

#10

Status:patch (to be ported)» fixed

#8 committed to 5.x-2.x-dev.

#11

Status:fixed» closed (fixed)

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