Reviewed & tested by the community
Project:
Menu Trails
Version:
6.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Issue tags:
Reporter:
Created:
20 Jan 2010 at 04:36 UTC
Updated:
4 Jan 2017 at 01:42 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
vood002 commentedI can confirm...when I try to get to settings page:
Comment #2
sunAre you sure this is not a duplicate of #630312: Runaway javascript on admin page ?
Comment #3
michelleWell, not sure, no, but I've never seen javascript errors cause out of memory errors before. If it can do that then, yeah, I guess it could be.
Michelle
Comment #4
stella commentedI'm having the same problem. I've a large number of vocabularies and terms, with about 12 content types and maybe 6 menus - and excluding the navigation/admin one - all have only about 10 items. The settings page is a massive memory hog. I had to increase my php memory_limit to 240MB temporarily in order to view it.
This is unrelated to any javascript problems. For a start javascript shouldn't cause php memory limit errors, and secondly I can reproduce it with javascript disabled.
Comment #5
vood002 commentedI still have the problem as well in version 6.x-1.1
Comment #6
FunkMonkey commentedI can confirm this problem with 6.x-1.1 as well. Jumped to 240M in php.ini to get view it but I *also* get the Javascript error from the #630312 issue when I try to save the settings page (but not when I try to view it). Related issues?
Comment #7
hobo commented+1 i'm seeing this with 1.1
Comment #8
jonhattanIn my case it is around 8000 tax in three levels.
It happens in the settings page because of the call to taxonomy_get_tree(). A workaround could be to add a checkbox to vocabularies edit form to be able to 'expose' them to menutrails. By default the checkbox is disabled and there's also a message that warns to not use vocabularies with a large taxonomy set.
Comment #9
stella commented"needs work" state is only for when there is a patch attached which doesn't full solve the problem, but there's no patch here yet. Resetting to active.
Comment #10
aschiwi commentedSame problem here: 8 vocabularies, a little over 2000 terms.
Comment #11
hobo commented+1 seeing this problem with 1.1 though reverting to 1.0 fixes it.. but i neeeed the new features..
Comment #12
aschiwi commentedThis might be interesting for some: I found out that I can actually see the settings page (and change settings) by creating a user, giving that user the admin role (using adminrole module) and then masquerading as that user. I wonder why this is, since the admin role created by adminrole module can do EVERYTHING except run update.php.
I have my memory_limit at 126M which gives me Fatal Error as User 1.
Comment #13
hobo commentedanyone get anywhere with this issue?
Comment #14
jonhattanHere's a patch implementing what I described in #8.
Comment #15
aschiwi commented@jonhattan: Thanks for the patch. I tested it and found that some particularly large vocabulary will not show up on the settings page and having only like 3 vocabularies shown on the settings page (one being very large) makes that error come back. I also have one very large vocabulary which _does_ get shown on the settings page, but I get a browser timeout when trying to open the collapsed fieldset. Do you think this can be improved by listing all available vocabularies on admin/build/menu/trails with a link to a separate page specifically for that vocabulary and its terms and then using a pager for the terms (because even on a separate page there might be timeouts when people have around 5000 terms)? I don't think this can be done another way when dealing with such a great number of terms. Unfortunately I don't know enough PHP to help you out here.
Comment #16
jonhattan3 vocabs of 1000 terms is more or less equivalent to a single vocab of 3000. So the memory limit problem may still be present if you enable those 3 vocabs for menutrails. The problem with the collapsible fieldset seems to be this other issue #630312: Runaway javascript on admin page. Not server related.
I don't see the point in using vocabularies with more than a few dozen of terms to set menutrails. Perhaps I'm blind in this point. I'm not interested in solving this usecase.
By the way, the only scalable approach I think of is to not load the whole terms tree and use an approach based on autocompletion in admin/build/menu/trails. This also implies a relative big change to the module.
Lastly, using a pager probably need a custom implementation of taxonomy_get_tree() to accept a limit.
Comment #17
aschiwi commented@jonhattan: I was thinking the same thing - I don't see how anyone would wanna set menutrails for such big vocabularies. But the problem right now is that people with huge taxonomies still need to set menutrails for node types and can't. However, there are temporary solutions in this thread and very likely not that many people with this problem, so imo there's no need to rush this.
Comment #18
michelleFWIW, I started this issue and my largest vocabulary has about 100 items in it. But I only had an issue with the latest dev; the last stable works fine.
Michelle
Comment #19
vood002 commentedThe patch in #14 allowed me to access the administration page...site has ~1000 terms in 7 vocabularies.
Comment #20
hobo commentedI might be missing something.. I have rather small taxonomies that i want to work with menu trails..
But very large taxonomies that are needed for other things..
How do i disable the large taxonomies for menutrails?
Comment #21
mgiffordWhat were the changes between 1.0 & 1.1 that caused this to break?
Would it be beneficial to have a large taxonomy to test against for future releases?
For active sites having taxonomies of over 1000 terms shouldn't be unusual.
Looks like the patch in #14 provides the ability to set the vocabulary used to set menu trails.
Surely this would be useful for performance reasons even if you weren't dealing with a large taxonomy.
Comment #22
teodor.sandu commented@jonhattan, post #14: +1 - worked for me beautifully, thanks :)
Comment #23
brian_c commentedThe problem as I see it, is the enormous number of complete menu trees that must be sent to the browser, to populate the select lists for each and every menu trail term.
Loading 1000 taxonomy terms isn't so bad. But sending 1000 menu tree select lists to the browser for those terms is an insane amount of data... and 99.9% redundant. You're getting O(N^2) exponential growth defined by: ( content-types+taxonomy terms ) * size of menu tree.
The real solution to this scalability problem is to only send the menu tree ONCE, then do "lazy" population only when each menu select list is actually clicked. This eliminates the multiplier effect entirely and improves the situation to O(N) linear scalability. Unfortunately this approach requires Javascript, so I'm not sure what issues that raises.
Comment #24
colanSubscribing.
Comment #25
traviscarden commentedI don't actually use Menu Trails for taxonomy at all, so I've just commented out the operative code in
menutrails.module, lines 266-285, in lieu of an actual solution:Comment #26
geasePatch #14 worked for me, thanks.
Comment #27
robcarrTried both #14 and #25. Was able to reduce PHP memory limit significantly to enable settings page to be shown with either option.
Comment #28
Alexander Matveev commentedPHP Fatal error: Allowed memory size of 268435456 bytes exhausted (tried to allocate 72352486 bytes) in /includes/common.inc on line 2976Yep, I've done the same, this made it work.
I think we should make the Settings page a "little" smaller ;)
Comment #29
Alexander Matveev commentedNo need to duplicate huge select boxes, custom_breadcrumbs module's settings page is better way.
Comment #30
brycesenz commentedThe patch in #14 worked for me as well.
Comment #31
Rhicreate commentedI can confirm that this problem could also be caused by the menu tree as I had menu trails working on my site - removed it for a while as I was trying to get i8n menus working - instead decided to build another menu for my 2nd language, and only now on reinstalling menu trails have I started getting out of memory errors. The size of my taxonomies has not been changed, just this extra menu has been added.
Unfortunately my server provider has set a maximum PHP memory limit which I am unable to exceed, so there's nothing much I can do about it! - Strange thing is, the error is actually showing that it tried to allocate a number which is way under the actual limit...
Comment #32
dman commented+1 more for #14
I'm also now hitting problems due to a huge menu (thousands of items repeated in a selectbox a few dozen times in the admin page) but that's another issue.
For now, I am surviving with the nice opt-in option by jonhattan
Comment #33
jonhattanIt's needed to clean up variables in hook_uninstall(). Will do it later today
Comment #34
baff commentedsubscribe
Comment #35
_redfog commentedsubscribe
Comment #36
korba commentedThe path form #14 is still the solution for big taxonomy.
Thank You
Comment #37
mgiffordAny reason it's not RTBC & already in this module? That issue was from May 30, 2010 which is nearly 2 years ago now.
Comment #38
daniel wentsch commentedPatch #14 just saved my life, thanks a lot!
Comment #39
joelpittetThe cleanup can be done on commit, this is likely outdated now though:)