Change profile banner as admin does not work
This topic contains 8 replies, has 3 voices, and was last updated by directoryfan 6 years, 8 months ago.
We have moved to a support ticketing system and our forums are now closed.
Open Support TicketTagged: change banner link, edit users
-
AuthorPosts
-
May 4, 2018 at 9:01 pm #2094
Hello Support Team,
when I try to edit an user there is a link to change the banner. This link does not work. Can you confirm this bug?
Greetings, Marius
May 4, 2018 at 9:04 pm #2095Are you speaking of the backend view of the profile editor?
Yes, that has been noted.May 4, 2018 at 9:17 pm #2097I mean when I try to edit users over WP:Users. On the user page there are also UsersWP options. When I click on the link a div is added to the page, but I can not see something as this text:
Note: Max upload image size: 1.00 MB
The html code, that have been added through admin-ajax.php:
<div class="uwp-bs-modal uwp_fade uwp_show" id="uwp-popup-modal-wrap"> <div class="uwp-bs-modal-dialog"> <div class="uwp-bs-modal-content"> <div class="uwp-bs-modal-header"> <h4 class="uwp-bs-modal-title"> Change your cover photo </h4> <button type="button" class="close uwp-modal-close" data-type="banner" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> </div> <div class="uwp-bs-modal-body"> <div id="uwp-bs-modal-notice"></div> <form id="uwp-upload-banner-form" method="post" enctype="multipart/form-data"> <input name="uwp_upload_nonce" value="9d0a7db519" type="hidden"> <input name="uwp_banner_submit" value="" type="hidden"> <button type="button" class="uwp_upload_button" onclick="document.getElementById('uwp_upload_banner').click();">Upload banner</button> <p style="text-align: center">Note: Max upload image size: 1.00 MB</p> <div class="uwp_upload_field" style="display: none"> <input name="uwp_banner_file" id="uwp_upload_banner" required="required" value="" type="file"> </div> </form> <div id="progressBar" class="tiny-green" style="display: none;"><div></div></div> </div> <div class="uwp-bs-modal-footer"> <div class="uwp-banner-crop-p-wrap"> <div id="banner-crop-actions"> <form class="uwp-crop-form" method="post"> <input name="uwp_banner_crop" disabled="disabled" value="Apply" class="button button-primary" id="save_uwp_banner" type="submit"> </form> </div> </div> <button type="button" data-type="banner" class="button uwp_modal_btn uwp-modal-close" data-dismiss="modal">Cancel</button> </div> </div> </div> </div>
May 5, 2018 at 10:42 am #2116Hi,
Please post the WP admin and FTP details of your site in private reply and we will have a look for you.
Thanks,
PatrikMay 5, 2018 at 11:52 am #2121This reply has been marked as private.May 5, 2018 at 1:22 pm #2125Hi,
I can’t find a path to the root of the WordPress site folder. Can you please mention the path to access the root of the WP folder so that I can modify the code in the file?
The problem is for the admin who wants to modify the user’s avatar/banner image from a backend. Currently, users can change their avatar/banner from admin backend (if have access to admin). Normally users do not have access to the other user’s profile on the admin side but if you want admin to have access to change the any user’s avatar/banner you can use the following code.
Update code in wp-content/plugins/userswp/includes/helpers/misc.php file at line no. 701
function uwp_add_admin_body_class($classes) { $screen = get_current_screen(); if ( 'profile' == $screen->base || 'user-edit' == $screen->base ) $classes .= 'uwp_page'; return $classes; }
Let me know your thoughts.
Regards,
PatrikMay 5, 2018 at 2:44 pm #2128This reply has been marked as private.May 5, 2018 at 4:01 pm #2129Hi,
I have made the changes in core file of the plugin.
Please review it and let us know your inputs.
Regards,
PatrikMay 8, 2018 at 12:07 pm #2178Thank you Patrik for the fix, this is working now and I can change the user banner as admin.
Greetings, Marius
-
AuthorPosts
We have moved to a support ticketing system and our forums are now closed.
Open Support Ticket