In hook_menu
, I have
$path = "events" $items[$path] = array( 'title' => t('Events'), 'page callback' => 'my_events_page', 'access arguments' => array('view my events'), 'type' => MENU_NORMAL_ITEM, 'file' => 'my_events.pages.inc', ); $items[$path . '/past'] = array( 'title' => t('Past events'), 'page callback' => 'my_events_past_page', 'access arguments' => array('view my events'), 'type' => MENU_NORMAL_ITEM, 'file' => 'my_events.pages.inc', ); $items[$path . '/%'] = array( 'title' => t('Events'), 'page callback' => 'my_events_page', 'page arguments' => array($depth), 'access arguments' => array('view my events'), 'type' => MENU_CALLBACK, 'file' => 'my_events.pages.inc', );
They were working, but not now.
If I change $items['events/past']
to $items['events/past1']
, it works.
Does it mean I have path conflict? If so, how can I resolve it?
Rows in my {menu_router}
table are as follows:
path: events page_callback: views_page (but I set it to xxx_events_page in hook_menu) fit: 1 include_file: empty (should not be empty) -- path: events/% page_callback: xxx_events_page (good) fit: 2 include_file: a file path is there -- path: events/past page_callback: views_page (but I set it to xxx_events_past_page in hook_menu) fit: 3 include_file: empty (should not be empty)
If I update the page_callback
and include_file
it works. If I clear the cache, everything set back to default.