I am getting this error, when I visist admin/user/permission/list on blank white screen background
warning: require_once(sites/all/modules/permissions_lock/user.admin.inc) [function.require-once]: failed to open stream: No such file or directory in /home/localafr/public_html/alpha/includes/menu.inc on line 346.
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | permissions_lock.patch | 1.24 KB | dharmatech |
Comments
Comment #1
asak commentedI'm getting this:
Fatal error: require_once() [function.require]: Failed opening required 'sites/all/modules/permissions_lock/user.admin.inc' (include_path='.:/usr/lib/php') in /.../public_html/.../includes/menu.inc on line 346
Comment #2
svendecabooterThanks for reporting this problem. This is now fixed in the latest HEAD version.
Sorry for the delay in fixing this issue.
Comment #4
JerryH commentedLooks like the file is either still missing from the latest download or the CVS update was on some where other than d.org ?
Comment #5
svendecabooterHi,
It's not the case that the file "user.admin.inc" is missing in the permission_lock folder, but rather that Drupal was looking for it in the wrong location (i.e. in the permissions_lock module folder rather than in the user module folder).
You should check whether your copy of the permissions_lock.module file is at revision 1.3, which featured this fix:
http://cvs.drupal.org/viewvc.py/drupal/contributions/modules/permissions...
Let me know if that didn't fix the problem.
I'll see if i can update the packaged download, so the fix is in the latest official release, rather than just in CVS HEAD.
Comment #6
mspIggy commentedsame problem -- I had to manually apply the patch to file -'permissions_lock.module'- (apache not seeing 'patch' command -WTH??)
I downloaded from repository around 22:00 hours CST (Minneapolis) today http://drupal.org/project/permissions_lock
...................................................................................................
Comment #7
JerryH commentedWorks fine for me now with the extra code, thanks :)
Comment #8
dharmatech commentedThe immediate problem is that when the menu path 'admin/user/permissions/list' is accessed, includes/menu.inc line 346 does 'require_once' for the file listed in the 'file' column of the 'menu_router' table . This column may contain 'sites/all/modules/permissions_lock/user.admin.inc', a file that does not exist, because of the way the menu is built when the permissions_lock module is enabled.
Specifically, when a module is enabled, _menu_router_build() is called to build the menu by collecting information from each module's hook_menu(). An undocumented feature of this process is that, if certain information is omitted in the return value from hook_menu(), inheritance rules are applied to copy the information from the 'parent' menu path (see includes/menu.inc lines 2340:2375). Since permissions_lock_menu() returns a path 'admin/users/permissions/list' but no 'file' value, path 'admin/users/permissions' is assumed to be its parent, and the 'file' value of 'user.admin.inc' is copied and stored as part of the information for menu path 'admin/users/permissions/list'. However, the path value defaults to 'sites/all/modules/permissions_lock' so the non-existent file is required whenever the 'admin/users/permissions_lock/list' path is accessed.
The most straightforward way to fix this is to change permissions_lock_menu() to return a path of 'admin/users/permissions_lock', which will prevent inheritance in _menu_router_build(). The patch to make this change in permissions_lock-6.x-1.0 is attached.
Comment #9
svendecabooterHi dharmatech,
Thanks for the writeup on this problem.
This issue was already fixed in the HEAD version of this module (through a slightly different approach than yours).
This reminded me to release a new version of this module, which i just did (6.x-1.1), including the fix to this problem and new features.
So be sure to check out the new release of this module!
Kind regards,
Sven