We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4749
    • 623 Posts
    After upgrading I can't add images via the new KCFinder. The images directory won't even load...(See attachment) I don't get any error messages in the manager or the server. I get an error message when I invoke KCFinder by pressing the browse directory button. Is Safari it says this: Refused to set unsafe header "Connection"

    I checked permissions, directories, and error logs. I've exhausted everything I can think of to do. Any ideas?

    Thanks!
      The MODx has you...
      Utah Web Design
    • I'm having this problem, too, except KCFinder works for browsing images but not file via the add/edit link button. I get the same "Loading..." messages for both the tree view and directory view, and if I wait long enough it changes from "Loading..." to "Unknown error."


        • 36552
        • 32 Posts
        I have been having this problem for weeks. I posted a question 2 weeks ago and then solved the problem. I screwed the thread up and have deleted it. But the solution is no longer working, so I'm back.

        What I had done to solve it was simply check and change all of the folder permissions in assets/images and .thumbs.
        assets/.thumbs seems to be the real problem here. If I get any error in my log, it is related to is_writable with a tmp directory in .thumbs. I'd post the actual output, but I'm not generating any at the moment even though I am having the same problem.

        I have set the correct permissions on these folders several times now. As I said, I had everything working 2 weeks ago. I went to upload some images a few minutes ago and can't do a thing.

        Clearly there is a problem with the configuration of mcpuk or kcfinder. I don't know how something that worked just stops working when I haven't done anything to the server files to change the behavior. We're talking about basic image uploading that never had a problem before 1.0.12. While I appreciate the excellent work and effort of the Evo development team, I can't release a site to a client with a major function simply not working.

        I've found several mentions of this problem but no official solution.
        • Hi djad33,

          I was having similar problems and went through a whole lot of trouble looking at file perms, configuration, re-installing TinyMCE, etc. and finally it came down to a bad file name in the assets/files directory (assets/images in your case). Make sure there aren't any file names with umlauts or other weirdo characters or bad symlinks (in my case I had a symlink pointing to the same directory, creating an infinite loop).

          Most likely this is where you will find the solution to your problem. One way to test is to temporarily rename your assets/images directory to something like assets/images-error and create a fresh new assets/images directory. If this fixes the problem you know that you're on the right track and can start looking for the offending file/symlink.

          Hope this helps,

          Rafi

            • 36552
            • 32 Posts
            Rafi,

            Sorry I'm so late getting back to you on this. I tried what you suggested, created a new images folder and set permissions (-775, then -777) and it did not work. I still hang when uploading. I also created a new .thumbs directory. It just doesn't work. It's a bizarre and very frustrating issue.

            To clarify though, I am not having a issue loading the contents of the directories. Any uploaded images show in KCFinder as expected. I am unable to upload anything new.

            Thanks for the help though.

            Duffy
            • Hey Duffy,

              Have you checked you PHP settings to make sure uploads are allowed? Can you upload files, just not images? Have you checked to make sure that the assets/images directory has the proper permissions in terms of owner? The group will want to be set to a group that has write permissions for the directory. Have you checked the MODX settings relating to file uploads? What changed in your configuration between when image uploads worked and when they stopped working? Have you tried using Firebug or a similar browser extension to view debugging info?

              Rafi
                • 36552
                • 32 Posts
                Rafi,

                I have, but I am going back through everything now and will report back if I find anything. This definitely feels/behaves like a permissions issue. KCFinder loads and seems to run properly. It's only when I upload that there is an issue, though that is a big issue.

                Duffy
                  • 36552
                  • 32 Posts
                  1. PHP settings: uploads are allowed
                  2a. Can't upload files or images via KCFinder
                  2b. Can upload files and images via File Manager
                  3. assets/images - 777; assets/.thumbs - 777; sub-directories within each are also correct
                  4. Groups are correct
                  5. MODx upload settings are correct
                  6. Nothing changed. It wasn't working. I got it working. It's not working anymore. It makes no sense.
                  7. I've tried using the developer tools in all browsers. The only feedback I get is in Firefox and it outputs the POST url with the message "Aborted". No explanation why or where it failed.

                  POST http://mydomain.com/manager/media/browser/mcpuk/browse.php?type=images&lng=en&act=upload Aborted

                  I'm running PHP 5.4 on a Rackspace Cloud Sites server.

                  Duffy
                    • 29781
                    • 25 Posts
                    Same problem here: Adding images via the new KCFinder is not possible any more. Thumbnails are showing. When clicking them, the chosen image does not show up in manager field.
                    Except updating MODX I did not change anything.
                    Any help is urgently appreciated.
                      • 42270
                      • 16 Posts
                      I have the same problem and traced it also down to the thumb-generating methods of KCFinder. In my case I have several directories with 100-1000 pictures per directory. After updating to Evolution 1.0.12 I get the message "Unknown error.". In my case the message was thrown in line 189, file media/browser/mcpuk/js/browser/folders.js.

                      I noticed that since Evolution 1.0.12 there is a new directory called assets/.thumbs and all thumbnails that has been generated before 1.0.12 will be generated all over again (in my case several 1000 images..).

                      For any reason, the methods used by KCFinder generating those thumbnails seem to put heavy load on the server, because every time I click on a directory in KCFinder, 30-50 Thumbnails will be generated for this specific directory, NOT MORE. AS LONG AS IF NOT ALL THUMBNAILS HAVE BEEN GENERATED, I will keep on getting the "Unknown error."-message, so I have to re-click the directory until all thumbnails have been made. ONCE ALL THUMBNAILS ARE PREPARED, I can access the directory without any errors!

                      So IMO the issue lies within the file /media/browser/mcpuk/lib/class_gd.php. Unfortunately I don´t know where to start, to find the final solution. In my case all images are around 1920x1280px, maybe large images are the problem?