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

    Im getting the following error message when trying to sort the document tree order, usine Modx Evolution 1. the error occurs as soon as the Doc Manager button is pressed.

    Parse error: syntax error, unexpected '(', expecting '}' in /home/sites/xxxxxx.xx.xx/public_html/assets/modules/docmanager/classes/dm_backend.class.php on line 77


    The line of code it points to is:
    $sql = "UPDATE {$this->modx->getFullTableName('site_content')} set menuindex=" . $key . " WHERE id=" . $id;


    The xxx replace the domain. Any help would be greatly appreciated.

    Thanks
    Dan.
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      What version of PHP are you using? That looks to me like a PHP 5 structure.
        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
        • 6408
        • 58 Posts
        Hi Susan, sorry for the late reply, Im using MODx 4.4.9
          • 10487 MODX Staff
          • 1,535 Posts
          Garry Nutting Reply #4, 17 years ago
          There are a couple of DocManager fixes required for PHP 4 - I suggest that you pull the latest DocManager files from SVN which have the necessary fixes or wait for MODx 1.0.1 which is just round the corner.
            Garry Nutting
            Senior Developer
            MODX, LLC

            Email: [email protected]
            Twitter: @garryn
            Web: modx.com
            • 6408
            • 58 Posts
            Thanks gary,

            Would it be advisable to upgrade the server to PHP 5? I take it this would include some securtity advantages as well as long-term compatibility?
              • 4310
              • 2,310 Posts
              I’d go for around PHP 5.2.6, although 5.3 is available it’s pretty new, I don’t know how ’bleeding edge’ you want to be laugh
                • 6408
                • 58 Posts
                Luckily my hosting provider has an easy switch to PHP - thats done and the doc manager is now working! Thanks for the help on this. Im surprised my host doesnt provide it by default, but hey the switch seems to work.

                Thanks for the help again.

                Dan.
                  • 4310
                  • 2,310 Posts
                  There are still a surprising number of hosts out there that have PHP4 as the default sad