Rework hook_menu_alter() for compatibility with other modules and less performance issues
Xano - June 17, 2009 - 17:33
| Project: | Vocabulary Index |
| Version: | 5.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Xano |
| Status: | needs work |
Description
This patch reworks hook_menu_alter() for compatibility wiht other modules using taxonomy/term/% like Taxonomy Breadcrumb. Using this path instead of taxonomy/term/[tid] also prevents performance issues with large browsable indexes.
| Attachment | Size |
|---|---|
| hook_menu_alter_00.patch | 4.93 KB |

#1
Code comment love.
#2
Breadcrumb start to work, but two items not.
1) Instead term title, e. g. "Drugs", it show "Taxonomy term"
2) Node not showing, "There are currently no terms in this vocabulary."
O_o
#3
1) Good one. This is a bug I will fix tomorrow.
2) Where, how and what? This message should only be shown if you visit an index page for a vocabulary that contains no terms.
#4
Thanks for help, Xano
For 2) Right, the message shown on every index page that contains no terms, but in that page i whant to see node with this term. I mean if you have some node with "term", you can't brouse for it becose it not shown on page for it "term"
#5
I'm not sure if I fully understand you. Index pages are the pages you define a path for at Administer > Site building Vocabulary Index. At those pages you will never ever see nodes, just terms or a message that says the vocabulary this page is for doesn't contain any terms. For browsable indexes Vocabulary Index overrides
taxonomy/term/%for certain terms to display their child terms. If a term contains no other terms, you should see the default Taxonomy term page at those URLs, otherwise Vocabulary Index should list those terms.#6
Sorry, i made mistake, i did't enable taxonomy/term/% views. Now i do but have "access denied" and warning: array_merge() [function.array-merge]: Argument #2 is not an array in domain\sites\all\modules\taxonomy_breadcrumb\taxonomy_breadcrumb.module on line 104. messages.
#7
That's a bug in Taxonomy Breadcrumb, not in Vocabulary Index.
#8
Ok, btw thanks a lot for your help.
#9
Tried to apply this patch, but TortoiseSVN tells me that
"Could not retrieve revision Jun 2009 19:54:16 -0000 1.1.2.5.2.83 of the file Z:\home\sessii.net\www\sites\all\modules\vocabindex\vocabindex.module.
Patching is not possible!"
:-(
#10
I manually patched the latest dev version. Everything seems to work fine, but I haven't really done a thorough review. Still, I thought I'd attach an updated patch to help move this issue along.
#11
Committed to 6.x-2.x-dev. Ports to 5.x-2.x-dev and 7.x-2.x-dev will follow. The patch applies to 6.x-2.x-dev and is intended for future reference.