[support] AHAH 403 error

Metzler, David metzlerd at evergreen.edu
Wed May 12 21:00:03 UTC 2010


You should remove the access_arguments, as they aren't used, but that's
not your problem. 

Not sure why you have 'title callback'.  Did you make that up?  I think
it should be removed, but again not your problem.  

The page callback function should print data, not use set message if you
want the data to get back to the javascript call. 


function citygrid_search_js($delta = 0) { 
  print "Hello world"; 
}

But of course you really should be printing the json object if I
understand ahah correctly. 

Dave
-----Original Message-----
From: support-bounces at drupal.org [mailto:support-bounces at drupal.org] On
Behalf Of Scott
Sent: Wednesday, May 12, 2010 1:49 PM
To: support at drupal.org
Subject: Re: [support] AHAH 403 error

I suppose I'm making some progress with this as now I just get a generic
javascript error message that an error has occurred, no number or
anything specific.  My hook_menu item looks like this:

  $items['citygrid/js/%'] = array(
    'title' => 'CityGrid Search',
    'title callback' => FALSE,
    'access callback' => TRUE,
    'access arguments' => array('access callback'),
    'page callback' => 'citygrid_search_js',
    'page arguments' => array(2),
    'type' => MENU_CALLBACK,
  );

The page callback function looks like this:

function citygrid_search_js($delta=0) {
drupal_set_message("Hello World...");
}

To let a cat out of the bag, this is a module for retrieving search
results using CitySearch's new API.  The configuration functions all
work and the form for collecting search criteria work.  It even produces
the url for fetching xml or json.  What I can't seem to do is get the
submit button to work correctly.


On Wed, 2010-05-12 at 08:59 -0700, Metzler, David wrote:
> Did you clear the cache after doing so?  I don't think you need the 
> 'access arguments'  entry...
> 
> You might reference this for a better example, that honors the access 
> content permissions setting.
> 
> http://api.drupal.org/api/function/hook_menu/6
> 
> Also remember to clear your cache before testing. 
> 


--
[ Drupal support list | http://lists.drupal.org/ ]


More information about the support mailing list