我對自定義drupal 7模塊有些麻煩。請注意,這不是我的第一個模塊。這是我的hook_menu;Drupal 7自定義模塊給出403
function blog_contact_menu(){
$items = array();
$items["blog_contact/send_to_one"] = array(
"page_callback"=>"single_blogger_contact",
"access_arguments"=>array("access blog_contact content"),
"type"=>MENU_CALLBACK
);
return $items;
}
而這是我的燙髮功能;
function blog_contact_perm() {
return array("access blog_contact content");
}
這應該工作,但是當我做一個ajax調用,它給403禁止。您無權查看bla bla。我的ajax調用是正確和簡單的,url是正確的,type是post。我沒有直接看到原因。
好抓!我甚至沒有注意到這一點。 – nmc 2012-08-16 17:34:04