Fork me on GitHub
Current releases are 2.1 (gold) and 2.0.18.11 (security patch for 2.0)
Ready for 2.1? Find out if your favorite plugins are compatible.
The 2.0 branch will no longer receive updates after Dec 2014.

Reorganising Categories...

Hi all,

We are just about to start using Vanilla Forums for our schools internal staff forum and I have hit what I think should be our final stumbling block.

Everything is perfect but when trying to reorganise categories I get the error 'Oops...Didn't save properly'. Does anyone have any idea why this may be? I have tried giving full permissions to everyone on the entire Vanilla directory to see if it was a permissions issue but the error still appears.

If there is another was to reorder the categories I am happy to give that a go.

Michael

Comments

  • I have just upgraded today and am having exactly the same issue. I have even tried creating some new categories altogether and I cannot reorder them either. I am reluctant to delete all my categories and start over unless absolutely necessary.
  • Before anyone asks, I even disabled every 3rd party plugin to prove that they werent to blame.
  • edited March 2011
    config file for review after upgrade for anyone that can help. i've noticed it still thinks version numbers are 2.0.16 for some reason..

    <?php if (!defined('APPLICATION')) exit();

    // Conversations
    $Configuration['Conversations']['Version'] = '2.0.16';

    // Database
    $Configuration['Database']['Name'] = 'FORUM2';
    $Configuration['Database']['Host'] = 'localhost';
    $Configuration['Database']['User'] = 'root';
    $Configuration['Database']['Password'] = 'XXXXXXXXX';

    // EnabledApplications
    $Configuration['EnabledApplications']['Conversations'] = 'conversations';
    $Configuration['EnabledApplications']['Skeleton'] = 'skeleton';
    $Configuration['EnabledApplications']['Vanilla'] = 'vanilla';

    // EnabledLocales
    $Configuration['EnabledLocales']['British'] = 'en-GB';

    // EnabledPlugins
    $Configuration['EnabledPlugins']['HtmLawed'] = 'HtmLawed';
    $Configuration['EnabledPlugins']['VanillaTinymce'] = 'VanillaTinymce';
    $Configuration['EnabledPlugins']['ForceGuestSignIn'] = 'ForceGuestSignIn';
    $Configuration['EnabledPlugins']['Categories2Menu'] = 'Categories2Menu';
    $Configuration['EnabledPlugins']['cleditor'] = 'cleditor';
    $Configuration['EnabledPlugins']['CivilTongue'] = 'CivilTongue';
    $Configuration['EnabledPlugins']['EasyReply'] = 'EasyReply';
    $Configuration['EnabledPlugins']['EMailSubscribe'] = 'EMailSubscribe';
    $Configuration['EnabledPlugins']['Emoticons'] = 'Emoticons';
    $Configuration['EnabledPlugins']['FileUpload'] = 'FileUpload';
    $Configuration['EnabledPlugins']['Gravatar'] = 'Gravatar';
    $Configuration['EnabledPlugins']['VanillaInThisDiscussion'] = 'VanillaInThisDiscussion';
    $Configuration['EnabledPlugins']['Poll'] = 'Poll';
    $Configuration['EnabledPlugins']['PostCount'] = 'PostCount';
    $Configuration['EnabledPlugins']['Signatures'] = 'Signatures';
    $Configuration['EnabledPlugins']['Quotes'] = 'Quotes';

    // Garden
    $Configuration['Garden']['Title'] = 'BSF Manchester Technical Forum';
    $Configuration['Garden']['Cookie']['Salt'] = 'XXXXXXXX';
    $Configuration['Garden']['Cookie']['Domain'] = '';
    $Configuration['Garden']['Version'] = '2.0.16';
    $Configuration['Garden']['RewriteUrls'] = FALSE;
    $Configuration['Garden']['CanProcessImages'] = FALSE;
    $Configuration['Garden']['Installed'] = TRUE;
    $Configuration['Garden']['Errors']['MasterView'] = 'error.master.php';
    $Configuration['Garden']['Theme'] = 'default';
    $Configuration['Garden']['Email']['SupportName'] = 'Forum Admin';
    $Configuration['Garden']['Email']['SupportAddress'] = 'forum-admin@bsf.ad.manchester.sch.uk';
    $Configuration['Garden']['Email']['UseSmtp'] = TRUE;
    $Configuration['Garden']['Email']['SmtpHost'] = '10.40.1.38';
    $Configuration['Garden']['Email']['SmtpUser'] = '';
    $Configuration['Garden']['Email']['SmtpPassword'] = '';
    $Configuration['Garden']['Email']['SmtpPort'] = '25';
    $Configuration['Garden']['Email']['SmtpSecurity'] = '';
    $Configuration['Garden']['Registration']['Method'] = 'Approval';
    $Configuration['Garden']['Registration']['CaptchaPrivateKey'] = '';
    $Configuration['Garden']['Registration']['CaptchaPublicKey'] = '';
    $Configuration['Garden']['Registration']['InviteExpiration'] = '-1 week';
    $Configuration['Garden']['Registration']['InviteRoles'] = 'a:3:{i:8;s:1:"0";i:16;s:1:"0";i:32;s:1:"0";}';
    $Configuration['Garden']['Update']['LastTimestamp'] = 1300285652;
    $Configuration['Garden']['Update']['Count'] = 1;
    $Configuration['Garden']['Html']['SafeStyles'] = FALSE;

    // Modules
    $Configuration['Modules']['Vanilla']['Content'] = 'a:6:{i:0;s:13:"MessageModule";i:1;s:7:"Notices";i:2;s:21:"NewConversationModule";i:3;s:19:"NewDiscussionModule";i:4;s:7:"Content";i:5;s:3:"Ads";}';
    $Configuration['Modules']['Conversations']['Content'] = 'a:6:{i:0;s:13:"MessageModule";i:1;s:7:"Notices";i:2;s:21:"NewConversationModule";i:3;s:19:"NewDiscussionModule";i:4;s:7:"Content";i:5;s:3:"Ads";}';

    // Plugins
    $Configuration['Plugins']['GettingStarted']['Dashboard'] = '1';
    $Configuration['Plugins']['GettingStarted']['Plugins'] = '1';
    $Configuration['Plugins']['GettingStarted']['Categories'] = '1';
    $Configuration['Plugins']['GettingStarted']['Profile'] = '1';
    $Configuration['Plugins']['GettingStarted']['Discussion'] = '1';
    $Configuration['Plugins']['GettingStarted']['Registration'] = '1';
    $Configuration['Plugins']['FileUpload']['Enabled'] = TRUE;
    $Configuration['Plugins']['Signatures']['Enabled'] = TRUE;

    // Routes
    $Configuration['Routes']['DefaultController'] = 'discussions';

    // Skeleton
    $Configuration['Skeleton']['Version'] = '1.0';

    // Vanilla
    $Configuration['Vanilla']['Version'] = '2.0.16';
    $Configuration['Vanilla']['Categories']['Use'] = TRUE;
    $Configuration['Vanilla']['Categories']['MaxDisplayDepth'] = '0';
    $Configuration['Vanilla']['Categories']['DoHeadings'] = FALSE;

    // Last edited by MikeBerry (10.40.7.6)2011-03-17 05:01:47
  • ....and it seems its not the config file causing this. Created a brand new 2.0.17.8 forum and then changed the config file to point at my old database after setup and the same issue continued.
  • I cant believe we're the only 2 people experiencing this?! Its well pecking my head now!
  • ... right just wasted half an hour with a duplicate database deleting all my categories and moving every post into a new one before then trying to create additional categories from scratch.... problem still persists. I cannot reorder or nest any of the new ones at all.
  • lucluc ✭✭
    @bezzoh: it would be better if you edited out Password and Salt from your config.
  • I've got this problem also after a new install. Everytime, I reorganize I have to do it manually using phpmyadmin to set the tree left, tree right, depth and sort fields. Its a freaking pain.
  • haha, cheers @luc

    Fortunately this is an intranet site anyway, but good point, well made! :)
  • @tjforsythe mate, that is genius. Well probably not to everyone else, but to someone that has very little experience of databases, i'm really chuffed I now at least have a workaround and can set the depth of my subcategories as I require to. As you say tho, major pain that I cant do this properly and the changes I make in the db do not reflect on the categories page in the dashboard.
  • @tjforsythe does your config report the correct version number?
  • Yes it reports the correct version.

    If you set your tree left, tree right and depth correctly, it SHOULD show correctly in your dashboard categories as well as your view. Make sure the tree left and tree right values encompass the sub category tree values. i.e.


    Depth 1 - 1 6
    Depth 2 - 2 3
    Depth 2 - 4 5

    Depth 1 - 7 x


    I hope that makes sense.
  • Category IDs aren't the issue, it is the placement numbers that matter. I use phpmyadmin to edit my database directly. If you look at the gdn_category table, you should see first the Root category as TreeLeft = 1, TreeRight = Z, and Depth = 0.
    All of your Main Categories (depth==1) should then have Tree ranges that fall between 0 and Z following this pattern (TreeLeft ... TreeRight):

    Cat a: 1+1 (or 2) ... a (Note '1+1' is the first category only)
    Cat b: a+1 ... b
    Cat c: b+1 .. c
    ...
    Cat z: y+1 ... z

    where z == Z-1

    Then each subcategory (depth==2) should follow a similar pattern:

    Cat aa: 1+1+1 (or 3) .. aa (Note '1+1+1' is the first category's first subcategory only)
    Cat ab: aa+1 ... ab
    Cat ac: ab+1 ... ac
    ...
    Cat az: ay+1 ... az

    where az == a-1

    This same patten should hold true for each depth level.


    Here is a simple example for a forum with a category for Cars and two subcategories, one for Fords and one for Chevys

    TreeLeft TreeRight Depth
    Root 1 8 0
    Cars 2 7 1
    Fords 3 4 2
    Chevys 5 6 2
  • UnderDogUnderDog Moderator
    Ok, it might be too complicated for me, but I'll read the explanation a couple of more times.
    Silly question for now : do you edit your database record by record or do you cook up a SQL query (which I would love to see)
  • I don't have that many categories, so I just manually edited them. I think a query would be difficult to construct
  • Just spent half an hour getting my categories into order now. Thanks for the tip, really appreciate that. Hopefully the next release of the forum might address my issues but for now i'm just chuffed I can actually do this even if it does mean some manual input.
  • I have today migrated my server to a new 2.0.17.9 install on another server with fresh installs of PHP/Apache/MySQL and after it first flattening and reorganising all of my categories into a single layer again it appears the problem is gone and I can now reorganise fully through the forum GUI.

    Chuffed isnt the word! :)

    Must have been something it didnt like with my original install, but i'm at a loss to explain what... I am however now using WampServer rather than relying on my own manual installation and config.
  • @tjforsythe finally a solution. This was doing my head in.
  • @tjforsythe Thank you VERY much, that's exactly what I needed to know.
  • just in case anyone is interested in this issue further, as I am over a year later, here are the links provided in the code base as to the logic/motivation behind this design hierarchical-data-database-2 wiki/Nested_set_model

Sign In or Register to comment.