Avatars not showing up

Hello,

Im using latest version of Avatars plugin on my wp multisite 3.1.3 and also 3.1.2
after uploading avatars nothing show up.

so i start tracing, everything seems to be okay, image successfully crop and upload in wp-content/uploads/avatars/$ directory.

the images link to avatars are something like mydomain.com/avatar/user-1-16.png and nothing shows in following link, not found ..

in avatars.php i checked get_avatar() function, im curious, i think im missing a RewriteRule in my .htaccess file , am i right ?

++ i doubled checked every permissions and tried reinstalling plugin ...

  • Hamed.Aghaei

    Update,

    i managed to solve this problem with my solution,

    replace line 1260 to :
    $out = 'http://' . $current_site->domain . $current_site->path . 'wp-content/uploads/avatars/user/' . substr( md5( $avatar_user_id ), 0, 3 ) . '/user-' . $avatar_user_id . '-' . $size . '.png?rand=' . md5( time() );

    replace line 1262 to :
    $out = 'http://' . $current_site->domain . $current_site->path . 'wp-content/uploads/avatars/user/' . substr( md5( $avatar_user_id ), 0, 3 ) . '/user-' . $avatar_user_id . '-' . $size . '.png';

    also

    replace line 1326 to :
    $path = 'http://' . $current_site->domain . $current_site->path . 'wp-content/uploads/avatars/blog/' . substr( md5( $id ), 0, 3 ) . '/blog-' . $id . '-' . $size . '.png?rand=' . md5(time());

    replace line 1328 to :
    $path = 'http://' . $current_site->domain . $current_site->path . 'wp-content/uploads/avatars/blog/' . substr( md5( $id ), 0, 3 ) . '/blog-' . $id . '-' . $size . '.png';

    ///

    well i believe a RewriteRule can fix this problem too, i'd love to hear a better solution , if there is not please mark this topic as Resolved,

    Thanks in advance.

  • Vladislav

    Hi,

    It sounds as if there is a problem with rewrite rules routing. Are you comfortable with looking into the database? If so, can you please check the options table for your blog, and search for "option_name" named "rewrite_rules"? That should be a serialized array of routing rules, and one of the keys should be "avatar/(.+)". Can you please verify that you have that rule? It should look something like this:

    s:11:"avatar/(.+)";s:28:"index.php?avatar=$matches[1]";

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.