Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Attached is a patch to add support for generating forum paths, so that menus don't disappear when visiting forum terms.
Comment | File | Size | Author |
---|---|---|---|
forum.patch | 1.42 KB | TripleEmcoder | |
Comments
Comment #1
TripleEmcoder CreditAttribution: TripleEmcoder commentedComment #2
Barrett CreditAttribution: Barrett commentedTripleEmcoder, can you clarify how to reproduce the issue this patch fixes?
Comment #3
TripleEmcoder CreditAttribution: TripleEmcoder commentedIf you setup a taxonomy to generate menu items by default they get taxonomy/term/[tid] paths, which is fine for regular taxonomies, but not for forum taxonomies. If you navigate to a menu item like that, the forum module takes over and redirects form taxonomy/term/[tid] to forum/[tid], which in turn breaks the menu (it disappears), because Drupal sees different paths and does not consider the menu item as active.
My patch is basically a copy paste of the original path generating function, except it creates paths that will avoid these problems.
Comment #4
hles CreditAttribution: hles commentedNeeds to be rewritten for 7.x-2.x. Also the option should only be available only for installations that have the "forum" module activated.
Comment #5
funkytraffic CreditAttribution: funkytraffic commentedFor me the patch is working, but it should be working with Taxonomy Menu Trails.
Comment #6
hles CreditAttribution: hles commentedIf we had support for custom paths #1035446: Custom menu paths in D7, wouldn't it fix this issue ?
Comment #7
hles CreditAttribution: hles commentedTo answer my own question, I think custom path sub-module solves this issue. Still, I'd like someone using forum paths to confirm that if possible.
Comment #8
Anonymous (not verified) CreditAttribution: Anonymous commentedI am using the Custom Path for the sole purpose of fixing this issue. Yes it does.
Comment #9
hles CreditAttribution: hles commentedOk then, let's close this.