Change profile banner as admin does not work

This topic contains 8 replies, has 3 voices, and was last updated by  directoryfan 5 years, 11 months ago.

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket
  • Author
    Posts
  • #2094

    directoryfan
    Free User
    Post count: 157

    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

    #2095

    Alex Rollin
    Moderator
    Post count: 27815

    Are you speaking of the backend view of the profile editor?
    Yes, that has been noted.

    #2097

    directoryfan
    Free User
    Post count: 157

    I 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>
    #2116

    Patrik
    Moderator
    Post count: 1971

    Hi,

    Please post the WP admin and FTP details of your site in private reply and we will have a look for you.

    Thanks,
    Patrik

    #2121

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #2125

    Patrik
    Moderator
    Post count: 1971

    Hi,

    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,
    Patrik

    #2128

    Alex Rollin
    Moderator
    Post count: 27815
    This reply has been marked as private.
    #2129

    Patrik
    Moderator
    Post count: 1971

    Hi,

    I have made the changes in core file of the plugin.

    Please review it and let us know your inputs.

    Regards,
    Patrik

    #2178

    directoryfan
    Free User
    Post count: 157

    Thank you Patrik for the fix, this is working now and I can change the user banner as admin.

    Greetings, Marius

Viewing 9 posts - 1 through 9 (of 9 total)

We have moved to a support ticketing system and our forums are now closed.

Open Support Ticket