We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 23018
    • 353 Posts
    Just one quick call for advice, before I catch some zzzs.

    Until today I had four MODx sites running with no problem at all. Yet today one of them started to behave very odd (latest release, no additional plugins except datetimepicker, seo friendly urls enabled)

    1. Suddenly I can’t sort my document tree by menu index anymore. Infact I can’t sort it in any way. Default sort order seems to be id/ASC
    2. Wayfinder also behaves very odd.

                  [!Wayfinder? &startId=`1` &level=`1` &sortBy=`menuindex` &sortOrder=`ASC` !]


    It also ignores any attempt to sort document items by anything other than id. Menu index is also ignored. If I tell wayfinder to set sortOrder=`DESC` it is also ignored. This behavior seems to be similar to the document tree problem.

    Any ideas whats going on?

    Good night,

    pepebe

    P.S. I also can’t get html export working. I alway get "Failed! Could not retrieve document." as a result. There might be a post here that could be helpful, but it is in DUTCH (http://modxcms.com/forums/index.php/topic,29380.0.html). Funny to read for a German (somehow familiar, but in the end downright gibberish to me). The google translation was priceless, but also not very helpful.

    P.P.S Somebody here mentioned a "MySQL 5.0.51 sorting bug". I`m not sure if this is related to the problem. Have to check tomorrow.
      Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
    • Quote from: pepebe at Mar 21, 2009, 09:20 PM

      P.P.S Somebody here mentioned a "MySQL 5.0.51 sorting bug". I`m not sure if this is related to the problem. Have to check tomorrow.
      It’s definitely the 5.0.51 issue. I bet your host upgraded to that version; have them update to the latest release or revert back ASAP.
        • 23018
        • 353 Posts
        Just checked the mysql version and guess what: 5.0.51a. Damned! Respective Site is hosted on a 1und1 server. Crap, there is nothing I can do except switching with that site too to anoter hoster. Problem is, that the client is soooo damned happy about them. I see a lot of fun coming for me on monday...

        Thanks,

        pepebe
          Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
          • 23018
          • 353 Posts
          Update: For anyone hosting a modX project with a "1&1 Business 5.0" package. The mysql version currently installed seems to be "5.0.51a" it’s outdated for about 15 months! There is nothing you can do about this, but move to another packaged or look for another hoster (strongly recommended).

          Apart from this latest "experience", there are other things that get on my nerves:

          - php 4 pre installed. You have to switch over to php 5 with a custom htaccess file. It should be the other way arround.
          - Try to find the "Contact form" they are talking about in their help section. forget it. Leave your backend and go to "impressum/disclaimer".
          - buggy mysql (just made it to the tiop. See above)
          - most other installed software is also only interesting from a professional web archeologist’s point of view (phpMyAdmin 2.6.4-pl3 release arround 2006 or 2007 with countless bugs and security risks). The most recent version is 3.1.3. phpmyadmin, but 2.11.9.4 (relaesed dez. 2008) would also be fine.

          THAT SUCKS!

          I could rave about a thousend other things more (literally) . If you want to hear about them send me a PM and i’ll start raving until you beg me to stop.


          Thats it for now

          regards,

          pepebe
            Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe
            • 7231
            • 4,205 Posts
            With so much literature available on the problems with mysql 5.0.51a it is amazing that any host uses it.

            However, before you move the site in despair, I think that the beta version of the new Wayfinder release has a work around for this bug: http://modxcms.com/forums/index.php/topic,33904.0.html

            This may get the site working until you get the hosting worked out.
              [font=Verdana]Shane Sponagle | [wiki] Snippet Call Anatomy | MODx Developer Blog | [nettuts] Working With a Content Management Framework: MODx

              Something is happening here, but you don't know what it is.
              Do you, Mr. Jones? - [bob dylan]
              • 23018
              • 353 Posts
              Thanks dev_cw for your reply.

              Some modx guy already posted a bug report in march 2008 about the topic:

              MySQL 5.0.51 and 51a are severely broken when a GROUP BY and ORDER BY are applied to the
              same column and MODx unfortunately depends heavily on queries that do this.
              Source: [10 Mar 2008 13:52] Tony Beyers  (http://bugs.mysql.com/bug.php?id=35181)

              By the way other cms also suffer from this problem (wordpress, etc).

              OK, this is a quickfix that should work as long as you don’t have two documents in your database that have been created at the same second.

              ---------------------------------------------------------------------------------------------------------------
              - Attention: This is a hack. Don’t use it in a productive environment until a few of us fearless daredevils say it’s ok -
              ---------------------------------------------------------------------------------------------------------------


              Search through your modx installation and find lines where

              GROUP BY sc.id

              appear.

              Try:

              GROUP BY sc.createdon

              instead.

              Among those files with "Group By sc.id" inside you have to change at least these two

              wayfinder.inc.php
              - line 351

              nodes.php
              - line 104

              Voila, wayfinder as well as the document tree behave like expected!

              There are other occurrences of "GROUP BY sc.id" in modx (see below), but before I recommend anyone to change them too, I need to have a closer look (something I can’t do right now, too busy...)

              document.parser.class.inc.php
              - line 1328, 1355, 1385, 1416

              ditto.class.inc.php
              lines 915, 983

              Regards,

              pepebe
                Homepage: pepebe.de | MODX snippets (and other stuff) at github: https://gist.github.com/pepebe