1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

XF 1.5 Error Uploading Files With Friendly URLs enabled

Discussion in 'Troubleshooting and Problems' started by PhoGro, Mar 11, 2016.

  1. PhoGro

    PhoGro New Member

    I'm getting an error message when trying to uploaded files my forum if the friendly URLs are enabled, but when I disable this feature, images upload perfectly fine using the flash uploader.

    Probably something to do with the configuration of the rewrites? Any ideas of where to start.

    Here's what I sent to my host to add to the server - maybe I missed something? They are an NGINX server and my XF install is located at www.mysite.com/community/

    Code:
    location /community/ {
    try_files $uri $uri/ /community/index.php?$uri&$args;
    index index.php index.html;
    }
    location /community/internal_data/ {
    internal;
    }
    location /community/library/ {
    internal;
    }
    location ~ \.php$ {
    try_files $uri =404;
    fastcgi_pass 127.0.0.1:9000;
    fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
    include fastcgi_params;
    }
     
  2. Mike

    Mike XenForo Developer Staff Member

    What's the specific error message? Do you get any different behavior with the Flash uploader disabled?
     
  3. PhoGro

    PhoGro New Member

    With the flash uploader enabled and friendly URLs checked I get the following error when uploading an image
    Screen Shot 2016-03-11 at 6.15.39 PM.png

    When flash uploader is disabled and friendly URLs checked after choosing a file to upload a few seconds goes by the file name disappears from the input box, but nothing happens.

    When friendly URLs are disabled and flash uploader is enabled things work as expected.

    Let me know if you need any more info.

    *Just wanted to add that I've tested this with Chrome and Safari (PC/Mac)
     
  4. Mike

    Mike XenForo Developer Staff Member

    Completely disabling JavaScript in your browser before uploading may also help give a better error (it should open a new tab for uploading, not an overlay).

    Is there anything else in your Nginx config? Note that only one location block is matched at a time, so it's possible something else could be matching in this case. (Can you view attachments with friendly URLs enabled?)
     
  5. PhoGro

    PhoGro New Member

    The error occurs after I've selected and attempted to upload the file from the popup file browser.

    Disabling javascript navigates me to a separate tabbed page in my browser titled "Upload Attachments". With a box to upload a file, but there's no way for this uploaded file to be attached into the thread. It's just uploaded to this standalone "upload attachment" page.

    Screen Shot 2016-03-11 at 6.52.03 PM.png Screen Shot 2016-03-11 at 6.52.09 PM.png

    I'm really sure about the server configuration - my host manages that. I can view attachments that have been uploaded to the site with friendly URLs enabled.
     
  6. Mike

    Mike XenForo Developer Staff Member

    I'm definitely not sure what's going on here. If you submit a ticket with access details for a user I can test with, I'll see if I can get to the bottom of it.
     

Share This Page