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.
In many cases, you want to only select part of a taxonomy. This enables you to select a base term; in which case menu items will only be generated for it's childrens.
Comment | File | Size | Author |
---|---|---|---|
#6 | support-base-term-2851794-2.patch | 8.31 KB | rbosscher |
| |||
#2 | support-base-term-2851794-1.patch | 8.28 KB | NickDickinsonWilde |
|
Comments
Comment #2
NickDickinsonWildePatch.
Comment #3
sascher CreditAttribution: sascher as a volunteer commentedI applied this patch to version 3.3 of taxonomy menu module and Drupal core 8.3.1
I chose the first term that is a parent and got this error in the db log upon save
Drupal\Component\Plugin\Exception\PluginException: The menu link ID taxonomy_menu.menu_link:taxonomy_menu.menu_link.test_tags.5 already exists as a plugin definition in Drupal\Core\Menu\MenuLinkManager->addDefinition() (line 350 of /Users/stanleyascher/Sites/taxonomy_menu_hack/core/lib/Drupal/Core/Menu/MenuLinkManager.php).
Comment #4
dani3lr0se CreditAttribution: dani3lr0se at Hook 42 commented@NickWilde would you be able to give me some steps to properly test this? I have the module installed and patched but it seems really glitchy or I'm just not configuring it right. It seems like every single configuration change I make produces a different unintended outcome. Once in a while it seems like it works, but I'm not really sure I guess. I just want to make sure I'm testing it correctly. For example: I created a vocab called "Hockey Cards" with 4 terms: "Sidney Crosby", "Alex Ovechkin", "Connor McDavid" and "Auston Matthews". I then added a few more terms and then nested them under "Sidney Crosby" > "2018", "2017", "2016", etc..
When I attempt to create a taxonomy menu with Sidney Crosby as the base term and parent menu link it ends up displaying all of the terms in the main navigation. When I set the term as the parent menu link it doesn't change and when I try to clear cache thinking that might help, I get a WSOD with the error "This website encountered an error. Please try again later".
So either I'm not doing something correctly (which might be the case) or maybe something isn't working as intended?
Thanks so much for your help and work on this. :)
Comment #5
dstolThanks for testing this daniel_rose. If you've got the patch applied, which I'm having a hard time against HEAD of 8.x-3.x, can you re-roll it?
Either way, this seems like it's needs work.
Comment #6
rbosscher CreditAttribution: rbosscher as a volunteer commentedI've manually applied the patch to the latest dev. It have it working, but i think it needs a little bit more love.
Especially this part, I think, is verry ugly, but I needed to do that, and I was lost on inspiration on a better solution.
Comment #7
rbosscher CreditAttribution: rbosscher as a volunteer commentedSettings this to needs work instead of needs review. The patch only works until you clear the cache, after that it messes up the menu structure.
Comment #8
DamienMcKennaWe need test coverage for this too, just to make sure it continues to work as expected.