It's a simple fix, upgrade to drupal 7.9 or later or do this in your module (that was my quick fix):

http://api.drupal.org/api/drupal/includes--menu.inc/function/menu_tree_s...

You might want to make a note in your module about the 7.9+ drupal requirement. Or better, if there is an internal mechanism to make it automatically dependent on the drupal minor version number, that would be perfect. Perhaps in the .info file you could change the line "core = 7.x" to core = 7.9". I've never tried that one before so if you do I would appreciate you noting that it worked here if it does.

Comments

SeriousMatters’s picture

Status: Active » Closed (works as designed)

It's a simple fix, upgrade to drupal 7.9 or later or do this in your module (that was my quick fix):

http://api.drupal.org/api/drupal/includes--menu.inc/function/menu_tree_s...

It won't work. Prior to Drupal 7.9, menu_tree_set_path() does nothing since the core menu system do not call menu_tree_get_path()

You might want to make a note in your module about the 7.9+ drupal requirement.

The module description page already has this note in bold font. read again.

Or better, if there is an internal mechanism to make it automatically dependent on the drupal minor version number, that would be perfect. Perhaps in the .info file you could change the line "core = 7.x" to core = 7.9". I've never tried that one before so if you do I would appreciate you noting that it worked here if it does.

Cannot set dependency on minor version. see Writing .info files (Drupal 7.x)

reg’s picture

I get it, you have it mentioned but people make mistakes, they're tired, have a too many things on their minds or whatever and they just miss a detail, like I didn't notice your note on the module page, or I did but because I was evaluating 10 things at once I forgot to check my version before installing it.

At least put something in the module so a person doesn't get a white screen which non-programmers are going to have a hard time recovering from. Fortunately I just disabled the module in my DB and then cleared a few cache tables (required) - most people won't be able to recover that easily.

A couple of simple lines in your init hook like the following could save someone a lot of trouble:

if (!function_exists('menu_tree_set_path')) {
  drupal_set_message('"Menu Trail By Path" works with Drupal 7.9 and above - please update your version of drupal.','warning');
  return;
}

Right now your "by design" can take a person's entire website down with no easy recovery for the less technical.

SeriousMatters’s picture

Thanks for your input.

I have added check and error message as you suggested.