[support] 404 or alias for menu hook
Metzler, David
metzlerd at evergreen.edu
Mon Jan 28 16:01:14 UTC 2008
Would need to see the menu $items definitions for these to give better
feedback. It doesn't sound like you're generating the menu item
correctly.
You should not be getting this message, but if you want a 404, you'll
have to code that yourself in your callback. Something like:
if (!$_GET['q'] != 'admin/settings/mymodule')
drupal_not_found();
The menu system passes this to your settings function by design.
Dave
-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Ivan Sergio Borgonovo
Sent: Monday, January 28, 2008 7:14 AM
To: support at drupal.org
Subject: [support] 404 or alias for menu hook
In a hierarchy of menu in admin/settings/mymodule
made mainly by
MENU_NORMAL_ITEM, MENU_DEFAULT_LOCAL_TASK and MENU_LOCAL_TASK
I'd like that if anything deeper than:
admin/settings/mymodule
is rubbish it get a 404 or a redirect to admin/settings/mymodule
eg. admin/settings/mymodule/ashasha
or
admin/settings/mymodule/somefunction/jajasha
-> 404
but I get:
warning: array_merge() [function.array-merge]: Argument #1 is not an
array in /*/includes/menu.inc on line 415.
warning: Missing argument 1 for drupal_get_form()
in /*/includes/form.inc on line 49. warning:
Missing argument 1 for drupal_retrieve_form()
in /*/includes/form.inc on line 179. warning:
call_user_func_array() [function.call-user-func-array]: First
argument is expected to be a valid callback, '' was given
in /*/includes/form.inc on line 218.
hints?
--
Ivan Sergio Borgonovo
http://www.webthatworks.it
--
[ Drupal support list | http://lists.drupal.org/ ]
More information about the support
mailing list