What is the correct way of using hook_menu_later.
I did this in my module to redirect (see also redirect in hook_init makes body text disappear):
function MYMODULE_menu_alter(&$items) {
$items['node/%node']['page callback'] = 'citykidz_node_page_view';
}
function MYMODULE_node_page_view($node) {
if ($node->type == 'event') {
if ($items = field_get_items('node', $node, 'field_event_date')) {
$date = date_create($items[0]['value']);
drupal_goto('news/events/day/' . date_format($date, 'Y-m-d'));
}
}
else {
return node_page_view($node);
}
}
And this got me wondering: what if other modules are also overriding hook_menu_alter and setting their own page callbacks on 'node/%node'? Or even on access or whatever. This is the standard Drupal way of doing things, but surely it will lead to problems (that can be hard to detect). I see there is a module Chain Menu Access API that addresses this. Has anyone had success using this module? And has this issue been addressed in Drupal 8?