We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 38164
    • 6 Posts
    Hi, I just moved a project I've been working on from my development server to its final server, everything is fine except that when I try to list the files (Files tab), nothing happens. In the console (I'm using google chrome) there's an error caused by the ext.js: "Uncaught SyntaxError: Unexpected token <". I haven't done any modification, just unzipped the files, but still it doesn't work. I checked that the zip files are not corrupted too, but the problem persists. Another symptom is that while editing an image tv, the manager shows me all the directories but not the files, and the error displayed in the console is: "Uncaught TypeError: Object #<Object> has no method 'apply' ". Is there something I'm missing? Any help will be appreciated.

    Thanks in advance smiley
      • 3749
      • 24,544 Posts
      Here are some things to try, if you haven't already:

      delete all files in the core/cache directory
      run setup
      turn off the compress_js and compress_css System Settings
      clear your browser cache *and cookies*
      check the path in the first record of the modx_workspaces table in the DB with PhpMyAdmin
      check all the paths and urls in core/config/config.inc.php

      If it's not one of those, the most likely thing is a missing or corrupted file or a file in the install. It's less likely if you unzipped the files on the server, but still possible.

        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
        • 38164
        • 6 Posts
        Hi!, thanks for your reply!, I tried all of the above but it didn't work, so I investigated a little. I found that the error was caused by the function "mb_strtolower" in the "modfilemediasource.class.php" at "core\model\modx\sources. It said that mb_strtolower was not defined, so the connector returned an error and extjs couldn't work. I installed a new modx in the same server to see if it was a problem with the php configuration but it worked well so now I'm confused why in the main project it says the function is not defined and in a new modx it's not, since its a php function that has nothing to do with modx. I've changed the 2 ocurrences of "mb_strtolower" to "strtolower" and everything's working now.
          • 3749
          • 24,544 Posts
          Newer versions of MODX test for that method. Here's an example from the new code:


          $properties['use_multibyte'] =  function_exists('mb_strtolower')) ? true : false;
          
          /* ... */
          
          $useMultibyte = $this->getOption('use_multibyte',$properties,false);
          
          /* ... *./
          
          $ext = $useMultibyte ? mb_strtolower($ext,$encoding) : strtolower($ext);
            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