Closed (works as designed)
Project:
Image Editor
Version:
6.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Reporter:
Created:
2 Dec 2011 at 23:37 UTC
Updated:
17 Feb 2012 at 06:50 UTC
This is not a bug with Image Editor. I just wanted to post this here for informational purposes in case anyone ever runs into it.
If you use Varnish and are using some default.vcl settings recommended by Lullabot, you will get the error "Failed uploading: [object XMLHttpRequest]". This is due to this setting:
# Always cache the following file types for all users.
if (req.url ~ "(?i)\.(png|gif|jpeg|jpg|ico|swf|css|js|html|htm)(\?[a-z0-9]+)?$") {
unset req.http.Cookie;
}Remove "png|gif|jpeg|jpg|" from the REGEX and you're all good. I hope I save someone else's hair! :D
BTW outstanding module! Totally blows away any other cropping/editing module! Thank you!
Comments
Comment #1
duozerskHi,
Thanks for the report! I renamed it to state that it is Varnish related.
Looks like the GET request wasn't the best way to process the saving :) I can change it to POST so that it doesn't conflict with the recommended Varnish settings. It will first get into 7.x and then will be back ported to 6.x.
Thanks again!
AndyB
Comment #2
duozerskWell... seems like some editors just require the GET type of callback.
Will try to talk to Lullabots - maybe they have some ideas about it :)
AndyB
Comment #3
duozerskMight be that if I add "/ajax/" to the callback URLs - then all should be fine with Varnish...
Comment #4
jrstmartin commentedIn the meantime, do you know the path I could exclude from Varnish caching to make it work? I tried excluding node/add from the rule but didn't work. I still get the error mentioned above.
Thanks.
Comment #5
duozerskSure, just anything under "imageeditor/*" will do the trick, or if you want to be more specific, try with "imageeditor/save/*" and "imageeditor/exit/*" (but there might be smth else).
Thanks
AndyB
Comment #6
jrstmartin commentedWorks! Thank you! Rather obvious :D. In default.vcl in
sub vcl_recv:Comment #7
kourosh.a commentedHi guys, I don't use Varnish, but I get the exact same error when I try to save the edit image file... anyone has any idea ?
Comment #8
duozerskKourosh,
Please open a new issue with your specific details (like what editor did you use, when the error pops up, etc.). This one is specific to Varnish reverse proxy cache.
Reclassifying it to a support request (as you can tweak Varnish settings to allow Image Editor to work fine) and closing.
Thanks
AndyB