Search code examples
drupal-7url-routing

Drupal Custom Module Results to 404


I'm having a really weird error right now. This was working fine a moment ago, but now when I access the url it gives the 404 error "Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request."

Here is my custom url

$items['timefie/obj/list/%'] = array(
    'title' => t('List Record'),
    'page arguments' => array(3),
    'page callback' => 'timefie_record_list',
    'access arguments' => array(2,3),
    'access callback' => 'timefie_user_access',
    'type' => MENU_CALLBACK // PLS IGNORE THIS LINE, I WAS DEBUGGING THEN
);

enter image description here

I have cleared my cache already many times to no avail. I have also back-tracked my last few movements to try put them back on their previous configuration namely (logintobbogan, site information).

Another pointer, I tried to create a Menu links of this URL in admin/structure/menu/item and it seems it accepts it as valid but he is not validating the last URL argument '%' see second picture...enter image description here


Solution

  • This 404 error is not from Drupal it's from your apache server, so i recommend that you check that you have clean URLs enabled also it will be a good idea to create a virtual host for your site because i think localhos/timefie is causing problems for you. then try again if you still have the same error check the page that redirected you to this page as there could be a broken link or check the callback function.