Warning: call_user_func_array() expects parameter 1 to be a valid callback, function 'taxonomy_access_admin' not found or invalid function name in menu_execute_active_handler() (line 503 of /var/www//includes/menu.inc).
This is because 'file' is not specified in the menu definition in taxonomy_access_hook_menu. I have a patch which I'll commit when I get a nid for this issue.
| Comment | File | Size | Author |
|---|---|---|---|
| #5 | taxonomy_access_hook_menu_fix-1271824-2.patch | 1.9 KB | cameron tod |
| #1 | taxonomy_access_hook_menu_fix-1271824.patch | 1.48 KB | cameron tod |
Comments
Comment #1
cameron tod commentedAttaching patch.
Comment #2
xjmNeed to set it to NR to go through testbot.
Comment #3
xjmFor clarity, I'd prefer to explicitly specify this on each item rather than performing the addition.
Also, this file should be getting added by
hook_init():If we are replacing the legacy pattern with a proper include via
hook_menu(), we should also remove it from there.Comment #4
xjmAlso, could you provide more information on the circumstances under which you get this error message? I am unable to duplicate it.
Comment #5
cameron tod commentedI installed the module using drush I then couldn't see any menu options at admin/config or admin/people/permissions, so I went to admin/modules to config from there - then when clicking through to admin/config/people/taxonomy_access got a wsod. Checking the logs showed the 'not found or invalid function name' error.
I tried both alpha and dev branches, and the same thing happened.
I'm not sure why the include is not working in my case - it could be because of caching (I also use an apc cache, I'm not sure if there are some gotchas there).
Having taxonomy_access.admin.inc included automatically by the menu system seems cleaner to me. I think there are some gotchas with hook_init on cached page views - although that's not an issue for admin pages, I think the hook_menu route is accepted best practice.
Attaching re-rolled patch.
Comment #6
xjmOdd, I use APC, and I've never had this problem. In any case this is a good patch; I've been meaning to move various legacy patterns throughout the module into
hook_menu()for awhile. (TAC dates back to D4.5 days.) :)We do need to include the admin CSS somehow. I'm on the fence about just attaching it to the admin form instead.
Edit: Just thought of something. If
hook_init()does not run for you generally, that would also break the module pretty badly (corrupting node access) because the shutdown function would not be registered. It may be I just need to move the shutdown function registration intohook_boot(). Are you using aggressive caching?Edit: See #1273080: [Rollback] Move registration of shutdown function from hook_init() into hook_boot().
Comment #7
xjmCommitted #5 with some minor changes.
http://drupal.org/commitlog/commit/364/c3d69391e9a0ee20603cac2b3cce98e31...
Comment #8
cameron tod commentedCool, thanks for rolling that in. Sorry I sort of abandoned this one, I've been really flat out. I don't use aggressive caching, so I'm not sure what happened really.
Updating my sites to the latest rc now :)