Hi,

I'm having a problem with group admins uploading files using both the core upload module and the filefield module. The progress bar starts then I get the following error message:

An AJAX request was aborted (status code 0). Path:/upload/js, readyState:undefined, statusText:'n/a', responseText:'XXX

Where "XXX" is the output of my 403 Access denied page.

A couple of things I've tried

- Same error in chrome/firefox/ie
- Works fine when user is given site-wide role
- Works with javascript disabled
- Have checked upload limits/file types/php upload settings etc.
- Have emptied cache etc.

I suspect what is happening is the AJAX uploader is calling /upload/js which hasn't been granted access via OGUR? Any ideas on how to fix it?

CommentFileSizeAuthor
#4 799100_filefield_ahah_upload.patch835 bytesmrharolda

Comments

hbevan’s picture

Version: 6.x-1.4 » 6.x-1.5
Status: Active » Needs review

In case anyone has the same problem, here's how I fixed it (feel free to turn into a patch if anyone is able to do so)
Line #2607

// Fix Ajax Uploads
if (arg(0) == 'filefield' && arg(1) == 'ahah') {
$location = 164;
if (isset($_SESSION['og_last'])) $gid = $_SESSION['og_last'];
}

Hope this helps somebody!

agence web coheractio’s picture

Version: 6.x-1.5 » 6.x-4.1

Problem still exists in 6.x-4.1
Any idea to fix this ?

Thanks

Laurent

agence web coheractio’s picture

Status: Needs review » Active
mrharolda’s picture

Status: Active » Needs review
StatusFileSize
new835 bytes

I found and fixed the upload error too!

My client is going to test this too, but on our test environment this patch proved to work nicely!

@hbevan thanks for the inspiration! ;)