1

It seems there is hardly any documentation on page call backs using URLS

This being the case I have 2 questions:

What is a legal callback path? and what becomes the URL to access that path?

Here is the code on my custom module:

  $menu['tipFeed/arguments/%'] = array(
'page callback' => 'tipfeed_create',
'page arguments' => array(2),
'access arguments' => array('access arguments page'),
'type' => MENU_CALLBACK,
);

Here is the function it refers to:

function tipfeed_create($first){
     return 'cool';
}

My module is called tipFeed.

why is the URL http://www.example.com/tipFeed/arguments/1 saying page not found?

Any help would be great, thank you

  • I've made a couple mistakes when doing hook_menu entries. Make sure your hook_menu callback is returning $menu. Also as @zhilevan said, clear the cache after any hook_menu change. For this callback, % is a wildcard. tipFeed/arguments will be an invalid path, but tipFeed/arguments/anythinghere would be a valid path. – Steven Linn Dec 4 '14 at 22:48
0

everything is ok, just try to clear cache and don't forget never, after any change in hook_menu clear cache

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.