Hi, When i ugraded the token module to the 6.x-1.16 version, I noticed that it removed token_menu_get_mid, so child page created with node relativity module breaks with
Fatal error: Call to undefined function token_menu_get_mid() in /../sites/all/modules/contrib/relativity/relativity.module on line 1331
Please, somebody helps me.
| Comment | File | Size | Author |
|---|---|---|---|
| #9 | 1168566.patch | 2.2 KB | threexk |
Comments
Comment #1
dave reidThe function was removed from Token module because it doesn't actually work in Drupal 6 (there is no global $_menu in core at all), and it was leftover from the D5 version of token. So this Relativity token never actually worked at all. Perfect. Moving this issue to relativity.
Comment #2
dave reidMarked #1162596: relativity-module broken because of new token-release as a duplicate of this issue.
Comment #3
modumo commentedBut i'm on the relativity issues section. Where should i post this issue?
Comment #4
dave reidI moved the issue from the Token project to the Relativity project for you.
Comment #5
modumo commentedAh, Ok. Thanks :)
Comment #6
teelmo commentedSubscribe!
Comment #7
draxiom commentedA temporary fix for the wsod is to comment out that section of the relativity module until they can address the issue.
In /modules/relativity/relativity.module (lines: 1331-1336):
$mid = token_menu_get_mid('node/'. $parent->nid);
while ($mid && $_menu['visible'][$mid]) {
array_unshift($trail, $_menu['visible'][$mid]['title']);
$mid = $_menu['visible'][$mid]['pid'];
}
becomes:
/*$mid = token_menu_get_mid('node/'. $parent->nid);
while ($mid && $_menu['visible'][$mid]) {
array_unshift($trail, $_menu['visible'][$mid]['title']);
$mid = $_menu['visible'][$mid]['pid'];
}*/
Comment #8
modumo commentedThanks, i abbandoned the relativity module and i used another method for doing the same thing.
But i think it should be better write the incompatibility between these two module in token notes.
Comment #9
threexk commentedI think the proper fix here is to just remove the code dealing with menu-related tokens. As Dave Reid points out, it never could have been working under D6, so no one using D6 Relativity is dependent on these tokens. Also, I am a former coworker of the person who primarily ported Relativity to D6, and I can attest that they did not ever use menu tokens.
If someone needs menu tokens in D6, they can write the code for them.
Comment #10
jonhattanWill try to find a way to still provide those tokens. If no luck I'll drop them per #9.
Comment #11
jonhattanVery easy indeed. Now there's an open option to bring other menu tokens into relativity.
This is the change: http://drupalcode.org/project/relativity.git/commit/18a5be4
Comment #12
threexk commentedThanks, jonhattan, for attempting a fix on the menu tokens. I now get the following error when trying out the latest dev tarball:
(The parts in brackets are things I redacted that are specific to my site.)
Comment #13
threexk commentedSorry, I was carelessly still using the previous version of Token when I tested before. The fix works great. Since this bug breaks sites using the latest Token, can we do a release?
Comment #14
jonhattanyes I'll release shortly once other issues are fixed.
Comment #15
threexk commentedThanks for your work.
What issues are blocking release? This is a critical bug, so I think we should do a release even if there are still other lower-priority outstanding issues. I checked the tracker, and I don't see any confirmed new bugs marked major or critical.