Solution to "Notice: Undefined index: access in _menu_translate()"

The error "Notice: Undefined index: access in _menu_translate()..." shows when Drupal is looking for a access callback that doesn't exist (see _menu_check_access() does not warn when the access callback does not exist).


I came across this error when working with the Entity API and using Model as my base. I changed the module and entity names, but I forgot one. So the access callback in hook_menu() was looking for the wrong function. But instead of telling me that, Drupal threw that "Undefined index" error.

function example_menu() {
   $items['my-menu-path'] = array(
      'title' => 'Example Page',
      'page callback'  => 'example_callback',
      'access callback'  => 'example_access',  // Make sure this function exists and is within context so it can be called
   return $items

So if you come across the same issue in development, I hope this helps!