Closed (works as designed)
Project:
Menu Trail By Path
Version:
7.x-2.0-rc1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
14 Dec 2011 at 10:29 UTC
Updated:
16 Dec 2011 at 05:52 UTC
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
Comment #1
SeriousMatters commentedIt 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()
The module description page already has this note in bold font. read again.
Cannot set dependency on minor version. see Writing .info files (Drupal 7.x)
Comment #2
reg commentedI 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:
Right now your "by design" can take a person's entire website down with no easy recovery for the less technical.
Comment #3
SeriousMatters commentedThanks for your input.
I have added check and error message as you suggested.