MIGX
MIGX copied to clipboard
Ajax Upload Not Working on SSL Site
Hi Bruno,
So I recently realized that two sites on one of my servers are having issues with the Ajax upload feature all of a sudden. Everything is working fine other than the multi-upload, which was working not too long ago.
The folder is correctly created for each resource with the proper permissions, but when I open the multi-upload box there is no "upload files" button and I can't drag images into it (screenshot attached). I tried updating MIGX and MODX to the latest respective versions, but no luck.
Any ideas would be much appreciated!
Also, here's a view of the console error being generated:
So I've figured out that this is due to having installed an SSL certificate on the website. The call to http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js is not secure, so it's not loading.
The only reference I can find to this file is in "ajaxupload.html" which is in the core/packages/migx-2.9.6-pl/ folder. But when I update that to https://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js the change isn't occurring and the error still appears (even after clearing core/cache and my browser cache etc).
Any thoughts on how to update that path to be secure would be much appreciated.
I think the file is this one https://github.com/Bruno17/MIGX/blob/master/core/components/migx/templates/mgr/iframechunks/ajaxupload.html
Instead of requesting jquery over http you can use a relative protocol like //code.jquery.cdn
Hi guys, thanks for the info.
Bruno, that's the file I updated and it's not making a difference. Any extra steps needed to make that change take effect other than edit then upload?
@Bruno17 You're right - I was in core/packages/ rather than core/components/. Updating the path to jquery in that file fixed it.
Perhaps this is something you can implement in future versions, so manual editing is not necessary for HTTPS sites?
@nickff Did you change it to a relative protocol, as suggested by jpdevries? which did work for you? Will change it in future versions, if I know its working for all protocols
I used the https protocol for the jquery path.