We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 43509
    • 24 Posts
    After few hours spent trying to decipher the problem I found the solution: php-mbstring extension was not enabled on my server... this cause errors in the ext-js script responsible for getting media sources.

    By the way, thanx for your help!
      • 28042 ☆ A M B ☆
      • 24,524 Posts
      And thanks for posting the solution. I'm sure others will find this interesting. Could you mark your last post as the answer to the question?
        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
        • 43509
        • 24 Posts
        Here it is a detailed explanation on how to find/reproduce "the solution" (well, in this case, when you have already checked everything else is ok).

        I discovered the problem by adding an error_reporting(8191) in the file websiteroot/connectors/index.php, just before the last lines which "handle the request":

        error_reporting(8191);
        /* handle the request */
        $connectorRequestClass = $modx->getOption('modConnectorRequest.class',null,'modConnectorRequest');
        $modx->config['modRequest.class'] = $connectorRequestClass;
        $modx->getRequest();
        $modx->request->sanitizeRequest();
        


        This way, you can read the javascript error as the xhr response to the call modx makes to retrieve the assets tree.
        In particular (for example using Chrome DevTools) check your network/xhr for a call to "directory.php?action=getList&id=/".

        This way I found an error related to "mb_strtolower()".
          • 28042 ☆ A M B ☆
          • 24,524 Posts
          It is recommended that all live sites have all errors sent to a log file. You can find all kinds of interesting things going on in the PHP error logs that don't necessarily make their way into the MODx error logs, since MODx itself is a .php script.
            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
            • 37801
            • 11 Posts
            WOW - what a long and convoluted path I took to find this answer. This EXACT scenario just happened to me when I switched to a new web server. THANK YOU so much matpiaz for posting the troubleshooting and detailed explanation. I NEVER would have figured that out without you! I turned on php-mbstring through easyapache and media browser now works as expected.