Support » Plugin: Avatar Manager » Today's update can't display avatar's now

  • Resolved itssri

    (@itssri)


    I updated the plugin today and suddenly all the avatar’s which were showing fine until then, are now “file not found”.

    I basically have different sized avatar’s but due to theme requirement I had modified the image call like below:
    <?php echo get_avatar(get_the_author_meta('ID'),84);?>
    which was working fine.

    But after today’s update, I get a 404 on the image.

    My images are named with the person name like abc-def.jpg, but the file that is being called (after update) becomes abc-dfg-84×84.jpg which gives a 404 because I don’t have a file named like that.

    How to rectify this?

    Thanks.

    http://wordpress.org/extend/plugins/avatar-manager/

Viewing 1 replies (of 1 total)
  • Hi itssri,

    Thank you for reporting. I’ve tried to reproduce the issue but no unexpected results so far. You can try to cleanup the plugin data and let it to regenerate it. To do so, open avatar-manager.php and add the following code at the end of the avatar_manager_init function, right after the load_plugin_textdomain call and refresh your browser.

    $args = array(
        'meta_key' => 'avatar_manager_custom_avatar'
    );
    
    $users      = get_users( $args );
    $upload_dir = wp_upload_dir();
    $options    = avatar_manager_get_options();
    
    foreach ( $users as $user ) {
        $custom_avatar = get_post_meta( $user->avatar_manager_custom_avatar, '_avatar_manager_custom_avatar', true );
    
        foreach ( $custom_avatar as $size => $skip ) {
            if ( is_array( $skip ) && ! $skip['skip'] ) {
                $file = str_replace( $upload_dir['baseurl'], $upload_dir['basedir'], $skip['url'] );
                @unlink( $file );
            } elseif ( ! $skip ) {
                $file = avatar_manager_generate_avatar_path( $user->avatar_manager_custom_avatar, $size );
                @unlink( $file );
            }
        }
    
        delete_post_meta( $user->avatar_manager_custom_avatar, '_avatar_manager_custom_avatar' );
        get_avatar( $user->ID, $options['default_size'] );
    }
    
    echo 'Don\'t forget to restore the <strong>avatar_manager_init</strong> function!';

    Please let me know if it helps.

    Thank you,
    Cătălin

Viewing 1 replies (of 1 total)
  • The topic ‘Today's update can't display avatar's now’ is closed to new replies.