0

I am working from a pre-existing Drupal 7 install. I downloaded the source files and downloaded a dump of the DB. When I first installed Drupal worked fine. I built a custom module, it was working just the way it needed to, a link to the page appeared in the navigation, and I was able to navigate directly to the page by typing in the url. Yesterday, I had to download a new dump of the DB, drop the tables from the DB I had in place and import the new download. After doing that, my module still shows in the available modules to enable, but it isn't in the navigation and when I try to type the pages url, it say's "The requested page "/TLSConnect3App/floor_map_page" could not be found." I've tried disabling/enabling it clearing caches, I've even tried replacing my hook_menu with an example, but nothing seems to work.

Here is my hook_menu :

function floor_map_menu() {
    $items = array();

    $items['floor_map_page'] = array(
        'title'     => t('Floor Map'),
        'page callback' => 'floor_map_page',
        'access callback'   => TRUE,
        'type'          => MENU_NORMAL_ITEM,
    );

    $items['floor_map_page/floor_map'] = array(
        'title'             => t('Floor Map'),
        'page callback' => 'floor_map_page',
        'access callback'   => TRUE,
        'type'          => MENU_DEFAULT_LOCAL_TASK,
    );
    $items['floor_map_page/setup_floor_map'] = array(
        'title'             => t('Floor Map Setup'),
        'page callback' => 'drupal_get_form',
        'access callback'   => TRUE,
        'page arguments'    => array('new_floor_map_form'),
        'type'          => MENU_LOCAL_TASK,
    );
    $items['floor_map_page/select_floor_map'] = array(
        'title'             => t('Floor Map Select'),
        'page callback' => 'drupal_get_form',
        'page arguments'    => array('select_floor_map_form'),
        'access callback'   => TRUE,
        'type'          => MENU_LOCAL_TASK,
    );
    return $items;
}

And here is an example I tried replacing it with:

function quick_menu() {

  $items = array();
  $items['quick/hello'] = array( // change to the url you want
    'title' => 'Quick Hello',
    'type' => MENU_CALLBACK,
    'page callback' => 'quick_hello',
    'access arguments' => array('access content'),
  );

  return $items;
}

function quick_hello() {

  $content='Hello. Thank you for surfing over to ' . $_GET['q'];
  return $content;
}

Either way, I get the same message, "Page not found".... I'm assuming the page callbacks are in a database table and I wiped that out with the import, but reinstalling the module/clearing caches should fix this, right?

I did find a script here: https://drupal.org/node/559364 but it is for Drupal 6..

Have also tried using menu_rebuild() and clearing all caches several times now.

So, I just went through and changed everything in my module that say's floor_map to floormap and it's working now..not the best way to fix the issue, but I can actually see my pages now, so I'll take it.

  • A reinstall of the module will not necessarily fix the path issues. Have you done a menu_rebuild (either the function directly or via the devel module)? – Wayne Weibel Mar 11 '14 at 18:20
  • Clear the cache and try again. – Rupesh Mar 11 '14 at 18:20
  • @WayneWeibel No, I havn't tried that, I will give it a shot. – slpcc63 Mar 11 '14 at 18:23
  • @Rupesh I have cleared the cache...have done so several times. – slpcc63 Mar 11 '14 at 18:24
  • @WayneWeibel I am having trouble getting to menu_rebuild. The instructions I've found have me inserting <?php error_reporting(E_ALL); define('DRUPAL_ROOT', getcwd()); require_once './includes/bootstrap.inc'; drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); menu_rebuild(); into a php file in the root Drupal directory and then navigating to that, trouble is, I get the same "Page not found" error when I try to get to the file in the root directory. Not sure how to access it using the devel module...can't find any help for that – slpcc63 Mar 11 '14 at 18:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.