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

    I’m after a little advice please - I have finished my modx site now, client approves and now wants the login details to amend and add their own info, great hay? Well not really. If they try and upload an image via the button on the content section (tinymce) then it loads FCKeditor. Select an image on the desktop thats only 105k named test.jpg and click upload. No errors come up and the browser says done but nothing shows up - I have logged in via ftp and no files where added.

    So the question is, how can I get this needed function to work or is there an alternative way the client can to do this? I have used maxigallery on the site and that works well but they need to be able to add their images within their text on some pages.

    I know I have asked this question before but not sure if I worded it very well.

    Hope someone can help.

    Thanks in advance
    • Make sure that the path in the Configuration in the Interface and Features tab is correct. Also check the user’s User tab to make sure he’s using the default settings.

      Check the permissions on the folder you’re trying to upload to; they all have to be writable by web scripts.

      Try uploading using the MODx file manager (Elements -> Manage Files). This will also let you know if you don’t have permissions to upload files to the desired folders.



        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
        • 5347
        • 11 Posts
        Hi ScottWell, thanks for the reply!

        I really am feeling think here! I have just checked my Elements > Manage Files and it was all blank. (Didn’t even know that was there). So I went and checked my Configeration as you mention and the links in there where just the domain name so I have changed that (File base path) to /home/bnlltfi/public_html/testsite/assets/ and my File Browser URL was set to assests/ which I have also changed to /home/bnlltfi/public_html/testsite/assets/. What should those link be do you think? I then looked round and under configuration> File Manager I have also put /home/bnlltfi/public_html/testsite/assets/ as that was just my domain. Is that anything to look at?

        I went back to the Manage Files and its now showing up this:
        Directory listing for:/ (theres no name there just a foward slash) then under that a live link that says
        New Directory then under that two unclickable lines, one reads....
        To top level and the other...
        Up one level. Under that I have...
        Filename and under that..
        assets
        ht.access
        index-ajax.php
        index.php
        sample-robots.txt.
        Next to all them I have info about when modified. I have a green button that lets me edit... index-ajax.php, index.php, sample-robots.txt. But my assests listed only has a red delete button next to it?
        Then under that I have....
        Directories: Files: 4 Data: 15.13 KB Directory writable? Yes.

        The user - I havent actually set them up as a user yet, I just did a test of what he will try doing and It wouldnt let me do it as an administrator.

        Hope this makes some form of sense and in a strange way I hope I really am being thick so its a quick fix, I think I cant see the forest for all those trees!


        • The path is probably correct; it needs to be an absolute file path starting at the beginning of your server filesystem (the starting / in this case means the beginning of the filesystem).

          The URL is not a path, it is a URL. URLs begin at the start of your web root (usually something like html or www or htdocs or public_html). In this case, the relative URL of assets/ is probably fine.

          Confusing a filesystem path with a URL is a common mistake. Path is for filesystem structure, URL is for web resources. Path starts at your server’s filesystem root, URL starts at your web root. That’s what the / at the end of your http://www.mydomain.com/ means. Go to that domain, then get the index file (index.php, in our case) at the root of that web domain.

          It can be confusing, because sometimes you want to access a file (an image, for example) with a URL (which is how the web browser fetches the images), or with a filesystem path. The path is what is needed if you are uploading an image, as it gets uploaded to a temporary holding location then gets moved to its permanent location. File paths are also needed when including another file in PHP.

          So to use the upload/insert feature in the rich text editor, you need to set both the path for images and the URL for images, since the editor will be doing both: moving the uploaded file to its final place, and storing its URL for proper <img> links, as well as requesting the image for display in your editing window.
            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
            • 5347
            • 11 Posts
            Thanks again for the reply, and all your help. I really am having some a bad head moments with this now, feel like throwing my machine out the window! It is now allowing me to upload using the file Manage Files YAY but thats it - them files then dont apear anywhere else on the site (ie in the site tree wysiwyg thing) but is on the server when I look at the ftp. I know this is a big ask but would it be at all possible for you to have a quick look if i send you the link details via email? No worries if you dont have time though?
            Many thanks again!
            • Sure, make me a temporary Manager login and send me the details at [email protected]
                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
                • 5347
                • 11 Posts
                Thats great, thank you so much - just sent you an email.
                Cheers again
                • For everyone’s information, it turned out to be an SUHOSIN setting; it only allowed 5 levels of directories, and the resource browser needs 6.
                    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
                    • 21323
                    • 20 Posts
                    i have a similar problem. when i click the fck editor to upload an image i get a pop-up, no folders, no ability to upload OR create a folder. no error message either. when i go to elements->manage files i can upload an image that way, but that of course isnt ideal:)


                    -my permissions are set as writable
                    -my file paths seem to be set correctly, and i tried the variations found here but that didnt work either
                    - i called my webhost and they say they do not run suhosin

                    so i am at a loss. is there anything else this can be?

                    thanks in advance