If you need a London based Drupal developer you can hire me. Check the availability page and contact me on info@aprium.net.
I have been having problems with the new menu system in Drupal 6. When editing my module menus an error started to appear which was "warning: Invalid argument supplied for foreach() in *****/includes/menu.inc on line 258". I first fixed this by rebuilding my menus which was done by adding the following code to the top of my index.php.
$rebuildmenu = true;
if($rebuildmenu) {
require_once './includes/bootstrap.inc';
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
menu_rebuild(); // use just once
die(); // use just once
}
But after some time the error came back and a menu rebuild did not resolve it. After var_dumping $data variable that seems to be making all the fuss in menu.inc I found that it contained a list of permissions. About half way down there were two empty arrays, this was happening because I was using 'access arguments' => true. Drupal 6 does not like this and the menus always need actual permission array passed to it.
If you need a London based Drupal developer you can hire me. Check the availability page and contact me on info@aprium.net.
Comments
THANK YOU!!! Replace the
THANK YOU!!!
Replace the boolean with an array..
replace this
'access arguments' => user_access('edit'),
with this:
'access arguments' => array( user_access('edit') )