Options
Thumbnails don't work properly when RewriteURLs is turned on
running on nginx with the following rewrites:
location / {
try_files $uri $uri/ @forum;
}
location @forum {
rewrite ^/(.+)$ /index.php?p=$1 last;
}
When RewriteURLs = FALSE, then previews show properly and thumbnails are saved in /uploads/thumbnails/FileUpload. However when RewriteURLs = TRUE then thumbnails are not saved and the location it is looking for the thumbnail in is /utility/thumbnail/FileUpload, which doesn't exist.
How is the thumbnail path being generated and why does it change with RewriteURLs turned on?
Thanks
0
Comments
Welcome to the Community.
should we guess your version of vanilla? Depending on version of vanilla - the answer and solution may be different.
good find. I wonder if its replicateable in apache with the same version you are using.
thse might help.
http://vanillaforums.org/discussion/23130/forum-post-ettikett-etiquette
http://vanillaforums.org/discussion/17954/food-for-thought-forum-etiquette
http://vanillaforums.org/discussion/25115/how-to-how-can-a-new-user-better-help-the-community-when-asking-a-question
there have been a few recent discussions pertaining to thumbnails that may provide insight if you search forum on thumbnail
probably in here class.mediamodel.php or here class.fileupload.plugin.php
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
I am running 2.0.18.8
I found this in class.mediamodel.php:
Which would seem to imply that is is checking for the file in "/uploads/thumbnails/$Path", but not finding it (when RewriteURLs is turned on), so it's returning "/uploads/$Path".
I am new to Vanilla, so please bear with me
Returning "/utility/thumbnail/$Path" I mean...
I tested on apache with rewrite TRUE and FALSE
worked both ways.
{ rewrite ^/(.+)$ /index.php?p=$1 last; }
should it be (I am not good at rewrite rules and no nothing much about nginx rewrites
{ rewrite ^/(.*)$ /index.php?p=$1 last; }
I may not provide the completed solution you might desire, but I do try to provide honest suggestions to help you solve your issue.
This seems to have fixed the issue. Added additional rewrite rule
as found here
http://vanillaforums.org/discussion/22736/fileupload-don-t-create-thumbnails-if-rewriteurls-true