We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23849
    • 223 Posts
    Hi All,

    I'm working on a Revo 2.5.0 install and for some reason, the children resources under a parent change their sort order in the managerresource tree every time I refresh it (we have about 80 children under this parent, so it's getting quite confusing).

    Anyone else ever seen this / have any ideas on how to fix? Let me know! [ed. note: presson83 last edited this post 7 years, 9 months ago.]
      Nick Hoag
      Creative Partner
      The FutureForward

      http://thefutureforward.com
      • 36818
      • 119 Posts
      Hi Nick,

      we experienced the same behaviour on a Revo 2.5.0 installation. Never found the reason for this. Looking for a solution, too.

        • 28432
        • 372 Posts
        Hi all,

        I've never see this trouble but i've you check context_tree_sortby and context_tree_sortdir settings ?
          • 23849
          • 223 Posts
          Quote from: Steeve at Jul 20, 2016, 05:10 PM
          Hi all,

          I've never see this trouble but i've you check context_tree_sortby and context_tree_sortdir settings ?

          Thanks, Steeve. Currently those are set to the defaults, so context_tree_sortby=rank and context_tree_sortdir=ASC.

          Is that what we should leave them as if we want normal behavior?
            Nick Hoag
            Creative Partner
            The FutureForward

            http://thefutureforward.com
            • 3749
            • 24,544 Posts
            Try changing context_tree_sortby to "key" (without the quotes), "menuindex" or "pagetitle". One of those should give you something you can work with.

            My 2.4.2 install has context_tree_sortby set to key. The order is consistent and I can drag them in the tree and they stay where I put them.

            I think the issue may be that your resources don't have a value in their 'rank' field -- there's no 'rank' field for resources in 2.4. Or maybe old resources don't have a rank but new ones do. I don't have a local 2.5.x version to check, but if resources have a rank field, it's new, and existing resources wouldn't have it set.
              Did I help you? Buy me a beer
              Get my Book: MODX:The Official Guide
              MODX info for everyone: http://bobsguides.com/modx.html
              My MODX Extras
              Bob's Guides is now hosted at A2 MODX Hosting
              • 44922
              • 131 Posts
              We also had this problem back on a version of Revo 2.3. Never solved it but never had it before or since. We posted on the forums and tried all sorts of solutions - include rank and sort by. No joy for this particular site. But we've never had it since. Your site sounds biggish Future FOrward - but if Bob's solutions don't work & you have the time, reinstall Modx, replicate the resource tree, check it works, copy the content. Not a nice job, so for our site in question, we just had to live with it.
                • 23849
                • 223 Posts
                Quote from: BobRay at Jul 20, 2016, 09:40 PM
                Try changing context_tree_sortby to "key" (without the quotes), "menuindex" or "pagetitle". One of those should give you something you can work with.

                My 2.4.2 install has context_tree_sortby set to key. The order is consistent and I can drag them in the tree and they stay where I put them.

                Thanks, Bob. Unfortunately this doesn't work (tried deleting everything in "core/cache" after the change as well). The odd thing here is that it's only the children of a particular parent... All of the top-level pages stay in the correct order, and children of other resources also stay in the correct order...it's only happening under one particular parent.

                Let me know if you have any other ideas!
                  Nick Hoag
                  Creative Partner
                  The FutureForward

                  http://thefutureforward.com
                  • 28432
                  • 372 Posts
                  Quote from: presson83 at Jul 20, 2016, 05:15 PM


                  Is that what we should leave them as if we want normal behavior?

                  Yes this is the default setting. Like that it will normally order the resources by menuindex ASC (if i'm not wrong).
                  Try the other suggestions ;-)
                    • 4172
                    • 5,888 Posts
                    if you have many resources in the tree, collections might help to keep them organized and listed in your prefered order.
                      -------------------------------

                      you can buy me a beer, if you like MIGX

                      http://webcmsolutions.de/migx.html

                      Thanks!
                      • 38142
                      • 91 Posts
                      After having exactly the same problem with child resources getting shuffled on every page refresh tried the suggestion of setting context_tree_sortby from "rank" (which it was by default) to "key" and that seems to have put an end to the shuffling. A solution. Thanks to Steeve and Bob for suggesting it.