Upload Failing inside form and/or from url params

I’m having an issue getting the upload to work using the shortcode when its on a page that includes a parameter in the url. I’m not sure if the cause at this point is the params in the url or inside the form where I’ve placed the shortcode.

The upload works fine on the /media/ tab in buddypress.

I’ve added the short code to a form, as described above. I’ve noticed the following differences from comparing console post and gets.

The failed post url is:


It appears that to post response is returning the page html of /edit-form/ instead of the /media/ json response.

The working url:


The response given is the json response:


I’ve tried updating permalinks; including setting to default and back.

I’ve also tried removing the /?post=xxxx/ using fiebug as a test (from within rtmedia hidden vars, as well as the browser url). This was done without a page refresh - so obviously was not effective. But worth a shot to see.

All post data looks correct, other than the referer - this is the only difference I see.

Not really sure where to take it from here - other than looking through the rt source and trying to find a method to handle the params and/or ignore them.

Thoughts or has anyone else experienced this?

I was able to access the same page without the param set in the url (lossing some functionality on my form…) and the uploader indeed uploads correctly.

How can I modify to ignore a url param in the referer


I have been able to get the uploader to work by defining the shortcode params.

The gallery however will not load the new images and this IS do to the url param in the referer.

Editing the following line will correct the issue:


Original: Line: 50 $url = trailingslashit ($_SERVER[‘REQUEST_URI’] );

Replace: Line: 50 $clean_uri = explode(’?’, $_SERVER[‘REQUEST_URI’], 2); $url = trailingslashit ( $clean_uri[0] );

Hope this helps someone else.