I had the same problem. Not sure which plugin’s fault it is, but the solution is to edit the TML code.
In wp-content/plugins/theme-my-login/modules/themed-profiles/themed-profiles.php, the code block specifically starting off with
function init() {
global $pagenow;
(around line 23)
should be changed to:
function init() {
global $pagenow;
if ( isset ( $_GET['delete_avatar'] ) ) { }
elseif ( 'profile.php' == $pagenow && !isset( $_REQUEST['page'] ) ) {
$redirect_to = add_query_arg( 'action', 'profile', $GLOBALS['theme_my_login']->get_login_page_link() );
$redirect_to = add_query_arg( $_GET, $redirect_to );
wp_redirect( $redirect_to );
exit();
}
}
It is an ugly, terrible, nasty fix but I have found it to work, and since I have meager knowledge of PHP, it is the best I can do.
You will also want to change UA code as follows:
Line 739 of user-avatar.php (at least in the latest version) should read:
$remove_url = admin_url('profile.php')."?delete_avatar=true&_nononce=". wp_create_nonce('user_avatar')."&u=".$profile->ID;
Comment that out (just in case!) and throw in:
$remove_url = "https://THEURLTOYOURSITEGOESHERE/wp-admin/profile.php"."?delete_avatar=true&_nononce=". wp_create_nonce('user_avatar')."&u=".$profile->ID;