Avatar of drupal_100
drupal_100
Flag for United States of America asked on

drupal hook_menu incorrect affect menu_rebuild - where see the log

When I try to create view, and also something else, the menu could not be rebuilt well, and can not access the view page... at all.
After long time effort, found out that my module did not do well on hook_menu, and I fix it. All work well again. When creating view, create record in menu_router well...

So if something wrong in hook_menu, it will affect the menu_rebuild and make all menu_router related things not working. But there is no error log information about this.

If something incorrect in hook_menu, where could I get some information about it?

The following is correct hook_menu.
function test_menu() {
  $items['testpage'] = array(
    'page callback' => 'testpage',
    'access arguments' => array('access content'),
    'type' => MENU_CALLBACK,
    );
  return $items;
}

function testpage() {
  return 'This is a test page';
}
DrupalPHP

Avatar of undefined
Last Comment
drupal_100

8/22/2022 - Mon
SOLUTION
Randy Downs

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
ASKER CERTIFIED SOLUTION
Hagay Mandel

Log in or sign up to see answer
Become an EE member today7-DAY FREE TRIAL
Members can start a 7-Day Free trial then enjoy unlimited access to the platform
Sign up - Free for 7 days
or
Learn why we charge membership fees
We get it - no one likes a content blocker. Take one extra minute and find out why we block content.
Not exactly the question you had in mind?
Sign up for an EE membership and get your own personalized solution. With an EE membership, you can ask unlimited troubleshooting, research, or opinion questions.
ask a question
drupal_100

ASKER
I will be very careful when working on hook_menu
Your help has saved me hundreds of hours of internet surfing.
fblack61