I cannot edit any menu when the Menu Access Module is enabled from 'Admin>Content Management>Menus>(menu)'. I get the following error. Both files do exist (menu.admin.inc and menu_access).
As soon as I disable Menu Access, I can edit the menu again. All other tabs function normally.
I have a multisite configuration, and the same happens in any other site.
Fatal error: require_once() [function.require]: Failed opening required 'sites/all/modules/menu_access/./../../modules/menu/menu.admin.inc' (include_path='.:/Applications/MAMP/bin/php5/lib/php') in /Applications/MAMP/htdocs/includes/menu.inc on line 346
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | menu_access_hook_menu.patch | 4.32 KB | fuerst |
Comments
Comment #1
emptyvoid commentedIssue identified, system not validating the a path to the root of the Drupal installation.
Comment #2
emptyvoid commentedPlease provide the following information
Operating System:
Operating System Version:
Database Server:
Database Server Version:
Http Server:
Http Server Version:
PHP Version:
Also please provide a link path to where the error occurred: (it doesn't matter that I can't access your site it helps me identify where)
Comment #3
emptyvoid commentedThe nature of the error is the script can not find the root of the Drupal installation to correctly include one or more of the core include files.
The short-term HACK is to define the directory path from the module to the root of the Drupal installation. I will provide where to edit the file until I can find a multi-operating system/php solution.
If you are reading this and have a similar problem please post your errors and or fixes
!!!!! ONLY APPLY THIS CHANGE IF YOU ARE EXPERIENCE ERRORS !!!!!
You will need to change two files.
file: menu_access.module
line 86: 'file' => menu_access_path_to_root(getcwd()) . drupal_get_path('module', 'menu') .'/menu.admin.inc',
change to: 'file' => '../../../../'. drupal_get_path('module', 'menu') .'/menu.admin.inc',
line 97: 'file' => menu_access_path_to_root(getcwd()) . drupal_get_path('module', 'menu') .'/menu.admin.inc',
change to: 'file' => '../../../../'. drupal_get_path('module', 'menu') .'/menu.admin.inc',
line 107: 'file' => menu_access_path_to_root(getcwd()) . drupal_get_path('module', 'menu') .'/menu.admin.inc',
change to: 'file' => '../../../../'. drupal_get_path('module', 'menu') .'/menu.admin.inc',
file: menu_item_access.module
line 89: 'file' => menu_item_access_path_to_root(getcwd()) . drupal_get_path('module', 'menu') .'/menu.admin.inc',
change to: file' => '../../../../'. drupal_get_path('module', 'menu') .'/menu.admin.inc',
In order to fix the problem once you have made the change you must rebuilt the menu cache. This can be accomplished with the link of the link if you have the devel module installed otherwise I have read if you just go to "admin/build/modules" it will force Drupal to rebuild the menu cache.
in the example changes I may have provided too many '../../../../', if the error continues try using just three directory up statements "../../../"
Thanks,
Comment #4
emptyvoid commentedFinally,
I have successfully recreated the bug listed here and I will commit a fix to head. Please down and test the release, if all goes well I will release a security fix.
Comment #5
emptyvoid commentedComment #6
Trunkhorn commentedI just had this same error with today's 6.x-1.5 release.
Fatal error: require_once() [function.require]: Failed opening required 'sites/all/modules/menu_access/../../../modules/menu/menu.admin.inc' (include_path='.:/usr/share/php:/usr/share/pear') in /var/www/secretwebsite.com/includes/menu.inc on line 346This happens on the
Administer › Site building › Menuspage when clicking either the "Add Menu" or "Settings" tabs when menu access is enabled.I am logged in as the root user of my drupal installation. As you can probably tell from my error link, I am on a development server. Here are the specs:
Comment #7
emptyvoid commentedHello, is this a fresh install or an upgrade from 1.4?
Comment #8
Trunkhorn commentedFresh install, first time trying it.
Comment #9
GaneshDevdas commentedHi.
The very same issue, as well fresh installation of 1.5
'../../../' in lines 86, 97 and 107 solves issue.
Distro: Debian // PHP5 5.2.9.dfsg.1-1 // PgSQL 8.3.7-1 // Apache 2.2.11-3 as well Suhosin Patch
Comment #10
fuerst commentedSame problem as in node_access issue #414764: Fatal error: require_once(). Attached is the patch for menu_access.module and menu_item_access.module.
Comment #11
drcheers commentedI get this after I do that:
warning: call_user_func_array() [function.call-user-func-array]: First argument is expected to be a valid callback, 'menu_edit_item' was given in /home/poorman1/public_html/war/includes/form.inc on line 366.
Any help would be appreciated. I am a HTML programmer not a PHP and I have no idea what that means.
Comment #12
emptyvoid commentedGreat patch I also have fixes for the array error and detection of un-published nodes..
I will roll the patch into the fixes I plan to release this weekend. Sadly I have been very, very, very busy.
Comment #13
emptyvoid commentedIssue fixed with the patch provided. Please reopen this issue should the issue still exist.