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

    I’ve been trying to sort this out but to no avail.

    I upgraded to 0.9.6.3 as I thought it was a good version, I use it on another install.

    My site (www.ayonline.co.uk) is now showing an error message




    « MODx Parse Error »
    MODx encountered the following error while attempting to parse the requested resource:
    « PHP Parse Error »

    PHP error debug
    Error: array_multisort() [function.array-multisort]: Argument #3 is expected to be an array or a sort flag
    Error type/ Nr.: Warning - 2
    File: /home/****/public_html/assets/snippets/ditto/classes/ditto.class.inc.php(562) : eval()’d code
    Line: 1

    Parser timing
    MySQL: 0.0132 s (47 Requests)
    PHP: 0.2498 s
    Total: 0.2629 s




    Please help me work out what to do to fix this.

    I thought that maybe it was not on the latest Ditto so I installed that 2.1+ and it didn’t make any difference.
    I upgraded from 0.9.6.1 if that helps and have not altered any of my Ditto calls that were all working just fine before the install upgrade.

    Please help me get this back online or I’ll be shredder fodder......

    cheers

    Steve
      • 7231
      • 4,205 Posts
      I think this is a Ditto version mismatch. You have one in your Manager (under snippets) and a different version in the assets/snippets/ folder. You need to update both the Ditto in the assets folder and the one in the Manager UI.

      And 0963 is the best version smiley
        [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]
        • 19646
        • 31 Posts
        Thanks for that suggestion it was much appreciated

        I have removed Ditto and uploaded all files.
        I have made sure the snippet in the manager resources tab is up to date also.

        Sadly it still does not work.

        Anyone got any ideas as the whole site is still off line .....


        PLEASE PLEASE help me huh
          • 19646
          • 31 Posts
          Here’s a quick update

          I have deleted the file its moaning about ditto.class.inc.php and run the homepage.
          It works and displays everything except the ditto stuff, which on the home page is more than half the content :’(

          I am therefore confident that the rest of the install should be OK. for those who have not used 0.9.6.3 it is good, grin I have it on other sites and liked the manager features so much that was why I am upgrading to it. Something must have gone wrong ’en route’ to cause this issue.

          As before if anyone’s got any suggestions please speak up as I have tried all things, I can think of and now am like headless chicken ....

          thanks

          Steve
            • 7231
            • 4,205 Posts
            Humm, making sure both Ditto (in manager and i assets) should have resolved this. In 0963 Ditto 2.1 is used. not sure what it was in 0961. From what i read in the forum all the array_multisort() issues had been resolved. What is the Ditto call that you have on the home page? maybe something has changed in the syntax, for example use &parents=`` rather than $startID=``.
              [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]
              • 19646
              • 31 Posts
              thanks for your thoughts, I would agree that changing the snippet and the files in the assets/snippets/ditto should have resolved this issue

              my calls are as follows

              [!Ditto?&parents=`210` &randomize=`1` &tpl=`leisureTPL` &display=`1`!]


              [[Ditto?documents=`[*eventID*]` &depth=`1` &tpl=`eventsHome` &hiddenFields=`eventLink, eventdate_human, event_details, event_endDate, eventLocation, event_contact, event_map, event_startDate, event_image` &display=`1` &noResults=`homeEvent_noResult`]]

              [!Ditto?&parents=`174` &levels=`2` &randomize=`1` &tpl=`featuredArticle_home` &display=`1` &hiddenFields=`articleTitle, articleImage, articleText, articleID`!]

              Hopefully there is not too much wrong here as these worked fine in 0.9.6.1 which I think used Ditto 2.0.2

                • 19646
                • 31 Posts
                grin AND WE’RE BACK......... grin


                I don’t know why but after pasting the ditto calls into the above posting I decided to paste them into a blank ’test page’ and try it outside of my other web code to ’bench test’ it.

                I remembered that when I was using my other install of 0.9.6.3 that i used the parameter &orderBy=`startDate ASC` and NOT &orderBy=`startDAte` &sortDir=`ASC`.
                This I think was causing the error as I sorted this out in my PHx switch to show the correct Ditto call and it all came back.
                Thanks very much.

                I thought I’d post back as I hope the testing crew, or some other poor headless chicken like me gets to read this and can solve an issue for someone else.

                *** To all people considering MODx 0.9.6.3 ****

                It is a great version and I would recommend upgrading to it, or installing it as a new install. I think it’s FAB laugh

                regards

                Steve