Page Arguments Not Getting Passed My code was working perfectly, but at some point my hook_menu page arguments stopped getting passed.

I am using versioning and can revert back to the previous code, but the page arguments are still broken.

Is there some change that could be causing page arguments to not get passed?

Thanks a million!

Disclaimer:  Sorry, I am not a Drupal developer, so the code is an attempt at injecting plain php into a site.

Inventory.module

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

  $items['admin/commerce/inventory'] = array(
    'title' =&gt; 'Inventory',
    'description' =&gt; 'View inventory reports for your store.',
    'access arguments' =&gt; array('access commerce reports'), // Inherited by children.
    'page callback' =&gt; 'inventory_reports_dashboard',
    'page arguments' =&gt; array( '10', 'DESC', 'false', 'admin@sltwtr.com', 'false'),     // page_arguments = threshold amount,  sort direction, hide zero inventory, email report to, save_to_email bool, download_csv
    'file' =&gt; 'inventory.dashboard.inc',
    'weight' =&gt; 0,
  );

  $items['admin/commerce/inventory-download-csv'] = array(
    'page callback' =&gt; 'inventory_download_csv',
    'access arguments' =&gt; array('access commerce reports'),
    'file' =&gt; 'inventory.dashboard.inc',
    //'type' =&gt; MENU_CALLBACK,
  );


  return $items;
}


Inventory.dashboard.inc

/**
 * Renders the inventory reports.
 */
function inventory_reports_dashboard( $threshold='10', $sort_direction='DESC', $hide_zero_inventory='false', $email='admin@sltwtr.com', $save_to_email = 'false') {
  drupal_add_js(drupal_get_path('module', 'commerce_reports') . '/theme/js/dashboard.js', 'file');
  drupal_add_css(drupal_get_path('module', 'commerce_reports') . '/theme/css/commerce_reports_dashboard.css');

  // on first load we want to grab all of the default values
  // after first load, we want updated values to pass through
  //$threshold = 18;
  $render = file_get_contents('http://' . $_SERVER['HTTP_HOST'] . "/sites/all/modules/inventory/inventory.php?threshold=$threshold&amp;sort_direction=$sort_direction&amp;hide_zero_inventory=$hide_zero_inventory&amp;email=$email&amp;save_to_email=$save_to_email");

  return $render;
}



function inventory_download_csv(){
  $file = './inventory.csv';
  $filename = 'inventory.csv';
  //drupal_set_header('Content-Type: text/csv');
  //drupal_set_header('Content-Disposition: attachment; filename=' . $filename);
  drupal_add_http_header('Content-Type: text/csv');
  drupal_add_http_header('Content-Disposition: attachment; filename=' . $filename);
  if($file) {
    //file_transfer($file, array('Content-disposition', 'attachment; filename='.$filename));
    $csv_contents = file_get_contents('http://' . $_SERVER['HTTP_HOST'] . "/sites/all/modules/inventory/inventory.csv");
  }
  else {
    return drupal_access_denied();
  }
  $fp = fopen('php://output', 'w');
  //$csv_text = array2csv($db_result);
  fputs($fp, $csv_contents);
  fclose($fp);
  exit();

}


Inventory.php

&lt;?php

define('DRUPAL_ROOT', $_SERVER['DOCUMENT_ROOT']);

require_once DRUPAL_ROOT . '/sites/all/modules/myfunctionlib/myfunctionlib.module';
require_once DRUPAL_ROOT . '/includes/bootstrap.inc';

//require_once DRUPAL_ROOT . '/includes/common.inc';
//require_once DRUPAL_ROOT . '/includes/module.inc';
//require_once DRUPAL_ROOT . '/includes/unicode.inc';
//require_once DRUPAL_ROOT . '/includes/file.inc';

//drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
drupal_bootstrap(DRUPAL_BOOTSTRAP_DATABASE);
clean_dump($_GET);


When I change the url:

mysite.gotpantheon.com/admin/commerce/inventory/12/DESC/false/admin@sltwtr.com

The get parameters no longer reflect changes

array(6) {
  ["threshold"]=&gt;
  string(2) "10"
  ["sort_direction"]=&gt;
  string(4) "DESC"
  ["hide_zero_inventory"]=&gt;
  string(5) "false"
  ["email"]=&gt;
  string(16) "admin@sltwtr.com"
  ["save_to_email"]=&gt;
  string(5) "false"
  ["q"]=&gt;
  string(0) ""
}
I would change your code to (as @J.Reynolds specified):

  $items['admin/commerce/inventory/%/%/%/%'] = array(
    'title' =&gt; 'Inventory',
    'description' =&gt; 'View inventory reports for your store.',
    'access arguments' =&gt; array('access commerce reports'), // Inherited by children.
    'page callback' =&gt; 'inventory_reports_dashboard',
    'page arguments' =&gt; array(3,4,5,6),     // page_arguments = threshold amount,  sort direction, hide zero inventory, email report to, save_to_email bool, download_csv
    'file' =&gt; 'inventory.dashboard.inc',
    'weight' =&gt; 0,
  );