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

    Many thanks to anybody who can shed some light on this;

    I've created a fresh installation of 2.4.2-pl on IIS 2008r2 and SQLServer 2008r2; but no resources are present in the resource tree (image attached).

    I have;
    reviewed all server requirements at https://rtfm.modx.com/revolution/2.x/getting-started/server-requirements
    tried repeat installation and rollback to 2.4.1 : same result
    css/js compression off fix & cleared cache,
    checked the response from the resource tree "refresh button" ajax call : 200 but no payload
    created a resource and confirmed that records are being created in the xxxxx_site_content table
    checked cache/log/error.log and found

    [2015-12-02 15:40:08] (ERROR @ /eriskmanual/modx241/connectors/index.php) Error 42S22 executing statement: 
    Array
    (
        [0] => 42S22
        [1] => 207
        [2] => [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Invalid column name 'true'.
    )
    


    A LAMP instance works fine - so I'm guessing sqlsrv driver problems?

    Database collation is Latin1_General_CI_AI (tried a few values)
    PHP Version 5.6.10
    Extensions loaded, curl, gd, mbstring.
    SQL driver : php_pdo_sqlsrv_56_nts.dll

    Thanks again!
      • 41364
      • 9 Posts
      I am working on a site for work on a server with the exact same setup as the OP. Unfortunately I also have the exact same issue. I've searched everywhere and can not find a solution.
      Just like the OP... Everything works perfectly on a linux/mysql setup. Definitely an issue with the sql driver or the syntax modx is using to call it.

      Does anyone have any information or solution on this issue?
      Is there a way to track down where in the code the error is coming from?

      [2016-01-10 21:52:30] (ERROR @ /connectors/index.php) Error 42S22 executing statement: 
      Array
      (
          [0] => 42S22
          [1] => 207
          [2] => [Microsoft][ODBC Driver 11 for SQL Server][SQL Server]Invalid column name 'true'.
      )
      • I'd say that's a bug that should be reported https://github.com/modxcms/revolution/blob/2.x/CONTRIBUTING.md
          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
          • 41364
          • 9 Posts
          Quote from: sottwell at Jan 11, 2016, 05:45 AM
          I'd say that's a bug that should be reported https://github.com/modxcms/revolution/blob/2.x/CONTRIBUTING.md

          Thank you.

          New issue has been submitted.
          https://github.com/modxcms/revolution/issues/12845
            • 41364
            • 9 Posts
            If anyone else has any ideas on where to look It would be greatly appreciated.
            Also, is there a list of error codes within modx? It seems like I've seen something like 'code' => 207 or similar while looking through files in modx.

            Thanks in advance!
              • 42914
              • 8 Posts
              Any resolution to this?

              As per the issue tracker, I've verified that the PDO driver is installed: https://github.com/modxcms/revolution/issues/12845

              Has anybody else found anything?
                • 42914
                • 8 Posts
                I have some more information about this.

                Changing this line in the core/model/modx/processors/resource/getnodes.class.php file resolves the site tree issue:

                Original:
                $c->leftJoin('modResource', 'Child', array('modResource.id = Child.parent AND Child.show_in_tree = true'));

                New:
                $c->leftJoin('modResource', 'Child', array('modResource.id = Child.parent AND Child.show_in_tree = 1'));


                This is running on SQL Server. Is this a bug or an environment issue? Can anybody help shed some light on this?

                Environment:
                Windows Server 2012 R2 Standard
                IIS 6.0
                SQL Server 2008
                PHP 5.6.15

                Drivers:
                extension=php_mysql.dll
                extension=php_mysqli.dll
                extension=php_mbstring.dll
                extension=php_gd2.dll
                extension=php_gettext.dll
                extension=php_curl.dll
                extension=php_exif.dll
                extension=php_xmlrpc.dll
                extension=php_openssl.dll
                extension=php_soap.dll
                extension=php_pdo_mysql.dll
                extension=php_pdo_sqlite.dll
                extension=php_imap.dll
                extension=php_tidy.dll
                extension=php_sqlsrv_56_nts.dll
                extension=php_pdo_sqlsrv_56_nts.dll
                extension=php_imagick.dll
                  • 3749
                  • 24,544 Posts
                  I'm no expert, but it looks like an issue with the dialect of SQL being used on the server.
                    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