Page not found

marenz - April 15, 2008 - 10:57

Hi, I don't know what more I can test to find what's the problem behind it:
I defined the menu like this:

$items['profile_comments/delete'] = array(
    'title' => 'Delete comment',
    'page callback' => 'profile_comments_delete',
    'access arguments' => array('delete comments of own content profile'),
    'type' => MENU_CALLBACK,
  );

and the link I defined like this:
  $links['profile_comments_delete'] = array(
     'title' => t('delete'),
    'href' => "profile_comments/delete/$object->cid"
  );

The link shown in the browser is right, containing the comment id, but when I click on it it says the message "page not found".

Thanx,
marenz

comment core module the same happens

marenz - April 15, 2008 - 13:56

Hi, I did some test: I change the path of the menu hook in comment core module and also the link in the link hook for deleting the comment (for example to testcomment/delete), from my point of view it should work under this path but drupal cant find the page.
Is there some other decleration necessary?

Thanx,
marenz

Hi guys, now it works

marenz - April 15, 2008 - 21:27

Hi guys, now it works, but I don't know why. Maybe there is a cache so after changing some code trying to make it work it couldn't find the right path instantly. But now it works.

Greetings,
marenz

 
 

Drupal is a registered trademark of Dries Buytaert.