Access denied for admin? Why when I am logged as admin I get an access denied page, the page is custom like mysite.com/test - added by the custom module:

function onthisdate_menu() {
  $items = array();

  $items['test2'] = array(
    'title' =&gt; 'Test route',
    'description' =&gt; 'description of test',
    'access callback' =&gt; TRUE
  );

  return $items;
}


Why is that happening?
You're missing page callback from your menu item. From the docs:


  "page callback": The function to call to display a web page when the user visits the path. If omitted, the parent menu item's callback will be used instead.


Since your menu item is the root item (has no parents) that's probably what's causing the access denied.

Just add a page callback to your menu item, implement the function to return a string or render array to display the page, clear Drupal's caches, and it should work.