Avatar Cropping issue
-
Hi, i cannot upload avatar either for profile or groups as its says
There was a problem cropping the photo
-
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#no0Buddypress plug in is up to date…
Have you found a fix?
MaLeeNot 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.Thanks for the workaround! I’ll give it a try in the meantime…
MaLee
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?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 1664I believe your host needs to enable mime_content_type on your server.
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.Hi, i enabled mime content in PHP, that didnt fix the issue, and posted my server log onto the ticket #8646 for reference.
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:12Thank You! I have it working now…
Sincerely
MaLeeHm.. 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?
I did try and reinstall the entire plugin as nihanthk did and sadly no luck there either. Running latest version of everything. hm..
Figured it out.. Fixed. PHP GD Module needed enabled. Might help someone else if it comes up.
- You must be logged in to reply to this topic.