User editing own media changes album_id to wallpost


#1

Hi there,

I have found an issue I wondered if you could help!

My site is currently set to allow users to upload media to different categories. I have added the shortcode for each category similar to the following:

[rtmedia_uploader album_id=“11”]

[rtmedia_gallery album_id=“11”]

It allows users to upload to that category and displays all of that category below.

It seems to work great, however I’ve noticed when a user edits the upload it reverts back to album 1, wallposts.

Is there anyway to turn this off? So the album remains the same?


#2

As I don’t mind users not being able to change the album when they edit a photo, I’ve found the file and code to remove - in /public_html/wp-content/plugins/buddypress-media/app/main/controllers/template/rt-template-functions.php I have removed lines 1366 to 1394

function rtmedia_add_album_selection_field( $media_type )

It now does what I need, however I don’t really want to change the actual rtmedia file, I want to change it in my child theme. Is this possible?

I have tried putting the amended file in the following places:

/public_html/wp-content/themes/twentyfourteen-child/rtmedia

and

/public_html/wp-content/themes/twentyfourteen-child/rtmedia/app/main/controllers/template

Can you help with where I should put the new file?


#3

Hello @jazvh,

We are not able to reproduce this issue on our demo site. We have also created one demo post for you on our demo site, so that you can check it by yourself here -> http://demo.rtcamp.com/rtmedia/edit-upload/

OR if anyway you want to remove album selection from single edit media page, you can put below piece of code into your theme’s functions.php file :

remove_action( 'rtmedia_add_edit_fields', 'rtmedia_add_album_selection_field', 14, 1 );

Hope this helps you.

Thank you.


#4

I have added that line to my functions.php file and works great! Thank you very much for your help!


#5

Hello @jazvh,

Glad to know your issue is solved. You are welcome! I am closing this thread now. Feel free to create a new thread if you have any other issues or doubts.

Thank you.


#6