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

    when creating sub folders containing blanks, uploaded files will not appear (although they are there). Reason is probably an error in handling blanks in folder names (see screenshot).

    Does anyone know which file I could take a look at?

    Thomas
    • You would be more likely to find your answers on the FCK site.

        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
        • 12262
        • 40 Posts
        Hello,

        found the problem (hopefully) by myself... maybe some others may find it useful as well:

        in the file [tt]manager/media/browser/mbpuk/frmresourceslist.html[/tt] I had to unescape the folderpath:

        function LoadResources( resourceType, folderPath )
        {
        	oListManager.Clear() ;
        	oConnector.ResourceType = resourceType ;
        //	oConnector.CurrentFolder = folderPath;
        	oConnector.CurrentFolder = unescape(folderPath);
        	oConnector.SendCommand( 'GetFoldersAndFiles', null, GetFoldersAndFilesCallBack ) ;
        }
        


        The same needs to be done in [tt]frmactualfolder.html[/tt]:

        function SetCurrentFolder( resourceType, folderPath )
        {
        //	document.getElementById('tdName').innerHTML = folderPath;
        	document.getElementById('tdName').innerHTML = unescape(folderPath) ;
        }



        Thomas
          • 7231
          • 4,205 Posts
          I make it a personal rule never to use blanks in folder or file names. But that is just me grin
            [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]
          • Actually, that’s been recommended practice for years. Dealing with spaces in URLs or filenames, especially in Web development, always involves ugly kludges, even if it’s hidden "under the hood" and you aren’t aware of it.
              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
              • 12262
              • 40 Posts
              Not to use blanks in folder and file names has been my rule as well... that’s why I did not find the error by myself. But the first web author of our (school) project did his first test and ran right into it.
              So I will better fix it.

              Thomas