Support » Plugin: User Profile Picture » Cannot replace Profile Image. TypeError: response is null (../mpp.js?ver=2.3.11)

  • rambillo

    (@rambillo)


    Hi there, hope all is well, especially in these very difficult and uncertain times.

    We’re writing to convey that we’re unable to update the profile image for existing users. ../loading.gif displays consistently and the same never completes.

    This is true even when this is the only this plugin active — i.e. debugging, in order to isolate the issue.

    Console logging shows the following:

        TypeError: response is null mpp.js:109:12
        mt_featured_set https://clientsite.com/wp-content/plugins/metronet-profile-picture/js/mpp.js?ver=2.3.11:109
        jQuery 7
        mt_featured_set https://clientsite.com/wp-content/plugins/metronet-profile-picture/js/mpp.js?ver=2.3.11:101
        <anonymous> https://clientsite.com/wp-content/plugins/metronet-profile-picture/js/mpp.js?ver=2.3.11:129
        Backbone 9
        clickSelect https://clientsite.com/wp-includes/js/media-views.min.js?ver=5.4:2
        click https://clientsite.com/wp-includes/js/media-views.min.js?ver=5.4:2
        click self-hosted:875
        jQuery 9
        Backbone 6
        constructor https://clientsite.com/wp-includes/js/media-views.min.js?ver=5.4:2
        i Backbone
        set https://clientsite.com/wp-includes/js/media-views.min.js?ver=5.4:2
        set https://clientsite.com/wp-includes/js/media-views.min.js?ver=5.4:2
        Backbone 2
        set https://clientsite.com/wp-includes/js/media-views.min.js?ver=5.4:2
        initialize https://clientsite.com/wp-includes/js/media-views.min.js?ver=5.4:2
        initialize https://clientsite.com/wp-includes/js/media-views.min.js?ver=5.4:2
        Backbone 2
        constructor https://clientsite.com/wp-includes/js/media-views.min.js?ver=5.4:2
        Backbone 2
        createSelectToolbar https://clientsite.com/wp-includes/js/media-views.min.js?ver=5.4:2
        <anonymous> https://clientsite.com/wp-content/plugins/metronet-profile-picture/js/mpp.js?ver=2.3.11:94
        p Backbone
    

    Appreciate any help or insight to debug further and resolve this issue, especially as we’re long time users of the plugin and have many users with custom profile images as a result.

Viewing 6 replies - 1 through 6 (of 6 total)
  • Thread Starter rambillo

    (@rambillo)

    Is this plugin still supported?

    Plugin Author Ronald Huereca

    (@ronalfy)

    That error usually happens when the JavaScript response is empty. Are you receiving any PHP errors in your error log?

    Thread Starter rambillo

    (@rambillo)

    Definitely appears the JavaScript response is empty. Big question is why? No errors in PHP log, though there is a warning when accessing the user-edit.php page that reads:
    [08-Apr-2020 00:19:46 UTC] PHP Warning: count(): Parameter must be an array or an object that implements Countable in ..../wp-admin/user-edit.php on line 293

    admin-ajax.php seems to be firing up just fine, but there’s no response to the edit.

    Something else perhaps of note, this plugin has been in use for quite awhile and many of the users have had the custom profile image since perhaps before you implemented metronet_image_id

    Is there any reason to think that older set images are incompatible to be updated in more recent times?

    Finally, is there a manual method for updating or replacing one user’s image for now? As the removal of a users image worked and we cannot set one to replace it, we’re now stuck with that user having the “mystery.png” next to their articles, which is a problem for the client.

    Plugin Author Ronald Huereca

    (@ronalfy)

    I don’t think so (about the incompatibility).

    There’s three places it can fail: https://github.com/madalinungureanu/user-profile-picture/blob/dev/metronet-profile-picture.php#L313

    A capabilities check, a POST variable check, and a nonce check. Unfortunately, without access to your site, I can’t troubleshoot which is causing the failure or why (nor am I asking for such access). If you have the ability, you can toss some error_log('check'); in the conditionals to figure out which one is causing the problem.

    I’d also test it locally to rule out general compatibility, but I installed a fresh version yesterday from the repo on a client’s site and it behaved as expected.

    Thread Starter rambillo

    (@rambillo)

    Thanks for the information. Definitely getting warmer now.

    It is failing the POST variable check. Specifically the post_type, which is a CPT and not ‘mt_pp’

    If I understand some of the earlier coding logic correctly, originally at least, the profile image was added to the author’s first post as the post’s featured image. Is that right? And in our case, where we’re trying to update that profile image now, the post type it’s tied to would necessarily be something other than ‘mt_pp’. Does that make sense?

    We are testing this locally and with everything else disabled.

    Thanks again for your help and support.

    Plugin Author Ronald Huereca

    (@ronalfy)

    Hmm, then that means this is where the bug likely is: https://github.com/madalinungureanu/user-profile-picture/blob/dev/metronet-profile-picture.php#L629

    I tried a blank install with no issues, so something is amiss.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Cannot replace Profile Image. TypeError: response is null (../mpp.js?ver=2.3.11)’ is closed to new replies.