Don't remove files from menu
KarenS - September 7, 2009 - 11:01
| Project: | Coder |
| Version: | 7.x-1.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Description
Now that #497118: Remove the registry (for functions) is in, we no longer want to remove the files entries from menus, but if you leave them there you get a coder review message like 'The "file", "path" and "file path" keys have been removed from hook_menu() and hook_theme().' If you follow the coder instructions to remove those entries, any callbacks defined in other files will not be available and you get fatal errors for the missing functions.
I'm not sure if hook_theme() is affected or not, nor am I sure what code needs to be changed in coder to fix this.

#1
OK, looks like it is not safe to remove them from themes either, or the theme functions are not discovered. I need both file and path entries to get things working without errors.
#2
Hi Karen,
I've attached a patch that removes the warning for occurrences of "file", "file path" and "path keys" array keys in hook_menu() and hook_theme() functions.
#3
I'll do a little more digging as to which keys are in hook_menu() and hook_theme() for D7, I'll also add a patch for /coder/coder_review/tests/coder_review_7x.test which contains tests checking for "file", "file path", "filepath" and "path".
#4
Thanks for reporting, reviewing, and testing! Committed.
A new development snapshot will be available within the next 12 hours. This improvement will be available in the next official release.
#5
Automatically closed -- issue fixed for 2 weeks with no activity.