Skip to:
Content
Pages
Categories
Search
Top
Bottom

Avatar Cropping issue


  • Nihanthk
    Participant

    @nihanthk

    Hi, i cannot upload avatar either for profile or groups as its says
    There was a problem cropping the photo

Viewing 12 replies - 1 through 12 (of 12 total)

  • MaLee Muse
    Participant

    @maleemuse

    I am having the same issue… no matter if I upload or take picture… it fails after the crop image…

    From what I found it looks like it was fixed in the updated in Version 10.
    https://buddypress.trac.wordpress.org/ticket/8619#no0

    Buddypress plug in is up to date…

    Have you found a fix?
    MaLee


    Nihanthk
    Participant

    @nihanthk

    Not yet, lets hope they fix it soon.
    as for workaround, crop the image manually and resize it as you need, then just add “-bpfull” at the end of the filename, and it will use the image without any cropping etc, even though it would prompt to crop image.
    at least the image will get loaded.


    MaLee Muse
    Participant

    @maleemuse

    Thanks for the workaround! I’ll give it a try in the meantime…

    MaLee


    Mathieu Viet
    Moderator

    @imath

    Hi @nihanthk @maleemuse,

    I’m really having difficulties to reproduce the issue, cropping avatars works fine for me and all the BP Team Developers.

    The feature we introduced in 10.0.0 is avatar’s history and the possibility for a user to recycle a previously uploaded avatar. There’s a way to deactivate the feature using this filter

    <?php
    add_filter( 'bp_disable_avatar_history', '__return_true' );

    into a bp-custom.php file for example.

    Using this filter solves your issue?

    Otherwise, if you look into your server’s error_log file, do you see if a specific line is appearing once you tried to crop an avatar?


    MaLee Muse
    Participant

    @maleemuse

    I will share the details you provided with my hosting company… and see if it works… prior to your reply… this is what was shared with me…

    Maybe it helps…

    [08-Mar-2022 10:23:27 UTC] PHP Fatal error: Uncaught Error: Call to undefined function mime_content_type() in /home/lppbgmmy/public_html/quantummemoirtheory/wp-content/plugins/buddypress/bp-core/bp-core-attachments.php:1664
    Stack trace:
    #0 /home/lppbgmmy/public_html/quantummemoirtheory/wp-content/plugins/buddypress/bp-core/classes/class-bp-attachment-avatar.php(274): bp_attachments_list_directory_files(‘/home/lppbgmmy/…’)
    #1 /home/lppbgmmy/public_html/quantummemoirtheory/wp-content/plugins/buddypress/bp-core/bp-core-avatars.php(1310): BP_Attachment_Avatar->crop(Array)
    #2 /home/lppbgmmy/public_html/quantummemoirtheory/wp-content/plugins/buddypress/bp-core/bp-core-avatars.php(1436): bp_core_avatar_handle_crop(Array, ‘array’)
    #3 /home/lppbgmmy/public_html/quantummemoirtheory/wp-includes/class-wp-hook.php(307): bp_avatar_ajax_set(”)
    #4 /home/lppbgmmy/public_html/quantummemoirtheory/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(”, Array)
    #5 /home/lppbgmmy/public_html/quantummemoirtheory/wp-includes/plugin.php(474): WP_Hook->do_action(Array) in /home/lppbgmmy/public_html/quantummemoirtheory/wp-content/plugins/buddypress/bp-core/bp-core-attachments.php on line 1664

    I believe your host needs to enable mime_content_type on your server.


    Mathieu Viet
    Moderator

    @imath

    Thanks a lot @maleemuse

    It looks like the issue is with the mime_content_type() PHP function. I’m going to work with this new input and see if we can use another function.


    Nihanthk
    Participant

    @nihanthk

    Hi, i enabled mime content in PHP, that didnt fix the issue, and posted my server log onto the ticket #8646 for reference.


    Mathieu Viet
    Moderator

    @imath

    Hi @maleemuse

    The mime_content_type() issue will be fixed in 10.2.0. Thanks for your report.
    See https://buddypress.trac.wordpress.org/ticket/8646#comment:12


    MaLee Muse
    Participant

    @maleemuse

    Thank You! I have it working now…

    Sincerely
    MaLee


    dbaucom
    Participant

    @dbaucom

    Hm.. wish I could say the update fixed ours but it didn’t. Still getting the “There was a problem cropping the photo” message or am I not understanding that the update was supposed to fix it?


    dbaucom
    Participant

    @dbaucom

    I did try and reinstall the entire plugin as nihanthk did and sadly no luck there either. Running latest version of everything. hm..


    dbaucom
    Participant

    @dbaucom

    Figured it out.. Fixed. PHP GD Module needed enabled. Might help someone else if it comes up.

Viewing 12 replies - 1 through 12 (of 12 total)
  • You must be logged in to reply to this topic.
Skip to toolbar