Tagged: avatar mod, moderation, plugin, wpdiscuz
We have been using the Avatar Moderation plugin for our BuddyPress site. It works fine for everything except Avatars related to wpDiscuz comments. When an Avatar is approved via moderation, the placeholder Avatar (silhouette of person) shows up for wpDiscuz comments, but the approved version works on all other sections, like the BuddyPress profile section and members list. When I log in as the user and try to upload it again, it gives an error after cropping it, but if I change the name of the file to not have “bpfull” in the assigned image name, the error goes away and the approved Avatar appears in the wpDiscuz comments. Any suggestions to fix the problem would be appreciated.
Hi,
Thank you for using the avatar moderator plugin.We haven’t tested it with wpDiscuzz and it was focused on BuddyPress only, so there may be the compatibility issue.
We will need 2 working days to test and add support(if it is feasible for wpDicuzz or let you know what is the best way).
Please allow us to get back to you by Monday.
Thank you
BrajeshwpDiscuz is used by a lot of people and it has BuddyPress integration. Getting it to work, or at least giving some advice on what we can do on our end would be appreciated.
Hi,
Thank you for the feedback. We will do our best to assit you.Regards
BrajeshHi,
Thank yo for the patience.We have found the issue. When a new comment is created, WPDiscuz caches the comment on file system. That’s why the state of that specific comment is preserved as markup. You are seeing the unapproved avatar as that is the avatar that got stored with the comment.
We are working on a solution to safely clear the cache. I am hopeful to have the compatibility. I will let you know in next 1-2 days.
Thank you
BrajeshHi,
Hope you are doing well.
Thank you for the patience.If you are comfortable with the code, Please put this code in your bp-custom.php
*/ /** * Enforce use cache clearing on avatar approval. */ add_action( 'bpavmod_avatar_approved', function ( $object ) { if ( 'user' !== $object->item_type ) { return; } $user = get_user_by( 'id', $object->item_id ); do_action( 'wpdiscuz_reset_users_cache', $user->ID . "_" . $user->user_email . "_" . $user->display_name ); }, 20 );
and try uploading a new avatar and going through the approval process. Does it work for the new avatar uploads now? Please let em know.
Regards
BrajeshHi,
Thank you for confirming. I am glad the issue is resolved.I am sorry, we don’t have any option or suggestion for moderating the profile cover.
Regards
Brajesh
You must be logged in to reply to this topic.