Please upgrade here. These earlier versions are no longer being updated and have security issues.
HackerOne users: Testing against this community violates our program's Terms of Service and will result in your bounty being denied.

nested catagories problem

chililbchililb New
edited March 2014 in Vanilla 2.0 - 2.8

Hi.
I'm creating a moderately large number of nested categories, as follows:

Country (Display root categories as headings.)

Argentina

Subcategory 1

Subcategory 2...

Subcategory 6

Australia

Subcategory 1

Subcategory 2...

Subcategory 6

and so on. Basically I have countries with 6 subcategories per country.

But now when I try to add new categories they are "sticking" at the root level (same level as Country). I can't move them to their proper nested location. This problem began with the subcategories of Switzerland, pretty far down my country list.

Is there a maximum limit on the number of nested categories? Or does anyone know of another reason why they are now sticking at the root level?

Thanks.

running Version 2.0.18.10

Comments

  • LincLinc Detroit Admin

    There's not a maximum per se, but categories aren't really meant to be used to that scale, and the UI could indeed start having issues with hundreds of categories. Beyond that, 2.0's going to suck up a ton of resources building a category tree that big for you. This is an area we're currently working on improving for 2.3.

    Have you considered using Tagging as an alternate solution?

  • No. I really need that structure. You can see what I am setting up here: http://orbisint.com/studyabroad/

    Do you have any other suggestions?

    Thanks.

  • I'm thinking about how tags might work. Is it possible to pre-establish tags (so I could just have countries as the categories, and make the subcategories be tags)? Or would countries still be too many categories?

    An alternative would be to have my six subcategories be the only categories, and then have pre-established tags for each country.

    But both of these depend on having pre-established tags. Is that possible?

    Thanks.

  • R_JR_J Ex-Fanboy Munich Admin

    Tags could either be predefined or freely be created by the users. I would go with the 6 categories and country as tag solution. That is much cleaner and your visitors could browse what could be expected elsewhere.
    In order to enforce a tag, you would need a plugin. That could easily be customized to suit your needs: https://github.com/R-J/AddWPInfo

  • I'll take a look at the plugin. Thanks.

  • You have Vanilla.Categories.MaxDisplayDepth config option

    I have a client with a lot of categories. I would advice against it generally, especially rigid hierarchical structure, it tends to create stranded islands.

    Not blow my own trumpet, but this give you more flexibility regarding headings

    http://vanillaforums.org/addon/categoryheadings-plugin

    So heading don't have to be on the first level, you can have heading at other level and they don't have to be locked.

    grep is your friend.

  • Thanks @x00. I'll take a look at the plugin. But I would still have the issue of possibly too many categories for Vanilla to handle, correct?

    How many categories does your client have? Does it slow down or crash the forum?

    I'm wondering how many categories is too many for Vanilla to run smoothly.

  • x00x00 MVP
    edited March 2014

    I don't think that describes the problem at all

    Did you set Vanilla.Categories.MaxDisplayDepth? if it is too low, then it won't nest.

    it is so your sidebar doesn't look ridiculous, rather then performance.

    grep is your friend.

  • LincLinc Detroit Admin
    edited March 2014

    @chililb said:
    I'm wondering how many categories is too many for Vanilla to run smoothly.

    Things like version, caching & hardware obviously effect how smoothly your forum runs. In this case, we're talking about how many categories can that reordering page handle in 2.0 before it starts choking on your particular platform, and the answer may be "looks like you found it". You cannot now extrapolate that problem to "if you have X or more categories, Vanilla 2.0 crashes" because it just ain't true.

    You could:

    • Try a different solution like Tagging
    • Try testing 2.2 and see if you can run that
    • Try manually reordering them by hand via a database editor like phpMyAdmin

    I don't see any other good options here.

  • So @Lincoln not sure we are on the same page.

    Categories aren't actually physically nested (which explain he lack of inheritance of properties like permissions), it is completely virtual relationship. It uses an algorithm, to build a tree. That algorithm is efficient enough to handle a couple more levels trivially. It avoids aimless recursion.

    With regard to discussion lists is really just a case of selecting category IDs.

    I didn't hear him mention to do do with performance issues. From my understand this 100% a display issue. In fact the categories could already be saved as he wants but aren't displayed as he wants. That is why I suggested the config option.

    grep is your friend.

  • LincLinc Detroit Admin

    I understand how nesting works. The problem is that building that tree is a fairly complicated system and it involves some old, weird jQuery plugin called "nestedsortable" that hasn't been updated in years. It's entirely possible that it's getting bogged down in the calculations / calls back to the server and timing out. To actually debug the situation would require him to trace what part of it is breaking, and I don't have the patience to walk thru this for an issue we've likely already sorted out in upcoming versions.

  • so he his saying that he can't move them in that interface. Ok

    grep is your friend.

  • hgtonighthgtonight ∞ · New Moderator

    I want to chime and also suggest using those 6 categories with the country as a tag. You really have too many categories, imo.

    Search first

    Check out the Documentation! We are always looking for new content and pull requests.

    Click on insightful, awesome, and funny reactions to thank community volunteers for their valuable posts.

  • Thanks to all for your input. Sadly, I thought I was close to testing my site with real people, but it looks like I need to get back to the drawing board.

    I'll play around with the tagging option... six categories with country tags. I'll see if I can figure out how to set up predefined tags and then list them alphabetically in a sidebar.

    One more thing that worries me now is that I am using Roles for colleges/universities. This is so that each member belongs to a "group" (Role) and I can use Role Signature to include a link to their programs. If all goes well, I would have a Role for every US college/university with a study abroad program. Will too many Roles cause problems like too many categories? If so that would be another major setback.

    Also, is 2.2 still in test mode, or is it ready to go?

  • peregrineperegrine MVP
    edited March 2014

    @chililb
    Also, is 2.2 still in test mode, or is it ready to go?

    2.2 is alpha as stated before in numerous discussions, read announcements and discussions relating to 2.1b2, etc.

    if you want to create a second test forum (if your host allows you to have two databases, you can test with 2.1b2 and experiment. Also as stated before.....

    http://vanillaforums.org/discussion/comment/192085/#Comment_192085

    that said 2.1b2 is used in some live sites. And 2.1b3 is said to be comming out soon to replace 2.1b2. When it does come out it will still be beta but have more features possibly and more bugs fixed. But you really need to understand the concepts of deciphering bonk errors as pointed out above. A bit about searching effectively on this forum. and understanding where to get add-ons in github for the version you are using. All this can be done with focus and a bit of experimentation.

    http://vanillaforums.org/discussion/24793/yet-another-vanilla-upgrade-and-duplication-tutorial

    having that many roles seems like overkill to me. Is it that necessary to have that many roles. Meaning are permissions and privacy that necessary for those individual. E.g. would it cause any harm to allow viewing of everything by anyone for a typical member and just have tags for both university and/or country.

    I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.

Sign In or Register to comment.