WPML and rtMedia activity media upload problem

Hi, We have been reported a problem when using WPML and rtMedia. In the activity page when you post an update and also upload an image, the image won’t be added.

Thanks

Hi @seventhqueen,

Are you facing any JavaScript or server error ?

Nope, no JS errors. the image rapidly says 100% and the activity is posted without the image

Hi @seventhqueen,

Can you give me admin login details so that I can look into the issue. You can give me a private reply with credentials.

Unfortunately it is not live. You just need to install WPML to test. Can you do that please?

Hi @seventhqueen,

I have tested on my end and is working fine. Is there some type of settings that you have set for WPML? Can you also check your server error logs for any type of error.

For activity attachment, when you click on Post Update , there will be 2 ajax call, one for media upload and second is for post update. You can check respone of those ajax requests for debugging.

I forgot to tell you that I have also the Buddypress Multilingual plugin installed. And yes I get an error from a request: http://localhost/sweetdate/members/admin//upload/

I have also checked with Buddypress Multilingual plugin and is working fine, I couldn’t reproduce the issue. Can you tell me what is the error for that “/upload” request?

Hello, it says 404 - not found

Try re-saving permalinks. It might solve the issue.

I did some tests and finally found the problem. It seems to work only when I disable BuddyPress Multilingual plugins

Hi @seventhqueen,

Yes we figure out the issue with BuddyPress multilingual plugin. We will try to fix it on our end if possible otherwise you will need to contact BuddyPress multilingual plugin developers. By the way, have you tried contacting them for this issue?

I haven’t contacted them, I thought that you need to make a check related to multilingual links to make it integrate fine with WPML and Buddypress since probably that link for upload needs to be changed accordingly. From what I saw the Buddypress multilingual allows you to translate the Members page for example so you can have a different /members link when on a different language than English. So I am thinking is related to that

It seems that is not related to WPML. I have multisite and the /membername//upload says it is 404 Not found when the upload finishes.

Hi @seventhqueen,

It looks like issue for upload URL. Add following code in your theme/plugin, it will fix issue.

function rtmedia_modify_upload_params_upload_url( $params ){
    if( class_exists( 'BuddyPress' ) && bp_displayed_user_id() && bp_is_activity_component() ) {
        $params['url'] = '/' . bp_get_activity_root_slug() . '/upload/';
    }
    return $params; }

add_filter( 'rtmedia_modify_upload_params','rtmedia_modify_upload_params_upload_url', 10, 1 );

Great. Works like a charm. this will be available in next theme update?

Hi @seventhqueen,

We have provided fix for BuddyPress Multilingual plugin in rtMedia. Please update rtMedia and let us know.