In my module, I have the following for hook_menu. The problem is that unless I'm logged in as user 1, any attempt to enter any of the url's results in a 403 without ever getting to any of the callback functions
function my_menu() { $paths = array(); $paths['xfer/out'] = array( 'title' => 'Transfer transaction data', 'title callback' => FALSE, 'page callback' => '_my_xfer_out', 'access arguments' => TRUE, 'file' => 'my_functions.inc', 'type' => MENU_CALLBACK, ); $paths['my/xfer/in'] = array( 'title' => 'Transfer transaction data from', 'title callback' => FALSE, 'page callback' => '_my_xfer_in', 'access arguments' => TRUE, 'file' => 'my_functions.inc', 'type' => MENU_CALLBACK, ); $paths['my/login'] = array( 'title' => 'Login for xfer', 'title callback' => FALSE, 'page callback' => '_my_login', 'page arguments' => array('Receive data', 'Deliver data'), 'access arguments' => TRUE, 'file' => 'my_functions.inc', 'type' => MENU_CALLBACK, ); return $paths; }
On Mon, 2012-07-02 at 22:32 -0400, Jeff Greenberg wrote:
In my module, I have the following for hook_menu. The problem is that unless I'm logged in as user 1, any attempt to enter any of the url's results in a 403 without ever getting to any of the callback functions
function my_menu() { $paths = array(); $paths['xfer/out'] = array( 'title' => 'Transfer transaction data', 'title callback' => FALSE, 'page callback' => '_my_xfer_out', 'access arguments' => TRUE,
I think this should be `'access callback' => TRUE` for debugging purposes, or just let any visitor pass through. I dunno what is the expected result if you pass TRUE as an argument to user_access()--the default access callback--.
fireh.
On Wed, Jul 4, 2012 at 1:19 PM, Fahri Reza wrote:
On Mon, 2012-07-02 at 22:32 -0400, Jeff Greenberg wrote:
In my module, I have the following for hook_menu. The problem is that unless I'm logged in as user 1, any attempt to enter any of the url's results in a 403 without ever getting to any of the callback functions
function my_menu() { $paths = array(); $paths['xfer/out'] = array( 'title' => 'Transfer transaction data', 'title callback' => FALSE, 'page callback' => '_my_xfer_out', 'access arguments' => TRUE,
I think this should be `'access callback' => TRUE` for debugging purposes, or just let any visitor pass through. I dunno what is the expected result if you pass TRUE as an argument to user_access()--the default access callback--.
The '* arguments' elements are required to be an array. You'll receive a PHP error during the rebuild of the menu if it is not.