We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 1828
    • 137 Posts
    Mod note: This thread began in the [Module] AJAX Menu Index thread. It became apparent that the problem is not with AJAX Menu Index but with the Menu Index field. This later turned out to be an issue with MySQL 4.1.21-standard, and the thread has now been retitled accordingly. In this thread Anton provides a workaround for this version, which is worth trying if you have the same issue.

    I have this module [Ajax Menu Index] installed and it appears to be working in the sense that it is changing the menu index numbers of the documents; however, neither the doc tree nor the menu are displaying the docs in the new order, even though both are configured to sort by ASC menuindex. I’m perplexed! Any suggestions?

    Thanks,
    Anton
      • 18397
      • 3,250 Posts
      Have you refreshed both your site (via the Refresh Site option) and your manager window (hit F5 in your browser of choice)?
        • 1828
        • 137 Posts
        Quote from: Mark at Aug 22, 2006, 01:38 AM

        Have you refreshed both your site (via the Refresh Site option) and your manager window (hit F5 in your browser of choice)?
        Yes, most definitely. When hovering my mouse over the docs in the tree the menu index numbers are correct, but the sort order is not. (The doc tree sort is correctly configured for menuindex/ASC as mentioned.)

        Thanks,
        Anton
          • 22815
          • 1,097 Posts
          Are some of them folders and some of them not?
            No, I don't know what OpenGeek's saying half the time either.
            MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
            Forum: Where to post threads about add-ons | Forum Rules
            Like MODx? donate (and/or share your resources)
            Like me? See my Amazon wishlist
            MODx "Most Promising CMS" - so appropriate!
            • 1828
            • 137 Posts
            Yes - 3 top level pages and one folder ATM.
              • 1828
              • 137 Posts
              Quote from: sottwell at Aug 22, 2006, 06:58 AM

              In the Tree, all folders will always be displayed before single pages.
              Not when sorted by menuindex/ASC though? Anyway, in this case, it was a document that was being displayed before a folder. Also, the same thing was happening in the wayfinder menu, even though that defaults to sorting by menuindex/ASC. I now suspect that the doc tree and menu are actually being sorted by the doc IDs regardless of what sort options I choose! I am totally puzzled by this. Any suggestions gratefully received!

              Thanks,
              Anton
                • 28042 ☆ A M B ☆
                • 24,524 Posts
                I figured that out, and withdrew my response.
                  Studying MODX in the desert - http://sottwell.com
                  Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
                  Join the Slack Community - http://modx.org
                  • 22815
                  • 1,097 Posts
                  Apologies, I too thought folders were displayed before single pages - somehow I’d never actually clicked on the Sort before. I’m actually quite pleased to see I can sort by menuindex. I can confirm that it works on my MODx and a recent test build of 0.9.5.

                  One thing that’s been overlooked lately is the fact that your menu script also uses the wrong order. I wonder if there’s possibly a problem with the field? Can you confirm that your db has menuindex as an int(10) in the table modx_site_content? And if it does, could you supply some details about your environment (PHP version, MySQL version, OS, etc)
                    No, I don't know what OpenGeek's saying half the time either.
                    MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                    Forum: Where to post threads about add-ons | Forum Rules
                    Like MODx? donate (and/or share your resources)
                    Like me? See my Amazon wishlist
                    MODx "Most Promising CMS" - so appropriate!
                    • 1828
                    • 137 Posts
                    Hi Paul,

                    No problem. I have been busy trying to upgrade a number of small-ish sites for my clients from my own .asp-based CMS to MODx and this is the first real head-scratching moment I have had with MODx (that has lasted for more than a few minutes, anyway!).

                    The DB appears ok. The menuindex field is int(10) and the numbers stored in the field for the docs are correct. They just won’t display in that order either in the doc tree or on the live wayfinder menu itself. My other, very similarly configured, MODx sites are fine and I can’t understand why there is an exception here.

                    More info re environment:

                    MODx version 0.9
                    Version codename rev 1005
                    Linux
                    Apache/1.3.36
                    MySQL 4.1.19
                    PHP Version 5.1.4

                    Thanks,
                    Anton
                      • 22815
                      • 1,097 Posts
                      OK. I think this is not a problem with AJAX Menu Index, but a problem with the menuindex field in general on your setup. I’m therefore going to spin this out to a dedicated thread in a more general support forum in the hope that someone has an idea of what might be going awry.

                      Can you just confirm that you have configured a similar MODx site on the same server which does work with Ajax Menu Index and sorts correctly?
                        No, I don't know what OpenGeek's saying half the time either.
                        MODx Documentation: The Wiki | My Wiki contributions | Main MODx Documentation
                        Forum: Where to post threads about add-ons | Forum Rules
                        Like MODx? donate (and/or share your resources)
                        Like me? See my Amazon wishlist
                        MODx "Most Promising CMS" - so appropriate!