See updates below. I upgraded to 3.7.1 using svn. I did this on my localhost first to make sure everything is fine. Everything was, so I proceeded to do it on the server. However, on the server, the users' avatars are not showing up and instead everyone is getting Gravatar's mystery man.
Here is the code I have in my functions.php:
<?php switch ( $comment->comment_type ) : case '' : ?> <p <?php comment_class(); ?> id="li-comment-<?php comment_ID(); ?>"> <div id="comment-<?php comment_ID(); ?>"> <?php echo get_avatar( $comment, 40 ); ?>
When I look at the source of the generated page on my localhost for the above I get the following code:
<img src="http://localhost/[path]/wp-content/uploads/avatars/[a number]/[imagename.jpg]"
On the server when I view source I get the following code for the same user:
I must be making a mistake somewhere but for the life of me I cannot figure it out. The only explanation I can come up with is that Gravatar is not accepting requests from localhost and that is why it is working the way I would like it to on my localhost.
So what do I have to do to make their local avatars show up (the ones they uploaded themselves)? I should also add that I am using the BuddyPress plugin (both on localhost and server).
Aside from that, is there a technique people use to compare the files on the server with those on the development machine? Something akin to vimdiff?
UPDATE: I copied the localhost directory recursively using
cp -r to another directory. I then rsynced that directory with the remote server making it a mirror of the server. Then I ran
diff -NbBiwr /path/to/localhost /path/to/localhostCopyThatWasRsynced and received no major differences save for stuff in the
.svn directories. When I view the copied version in a browser the local avatars show up. This is really starting to make no sense at all. I also updated the sql database to reflect the one on the remote server and the local avatars show up on localhost but not on the remote server.
UPDATE 2: Here are all the things I attempted since the last update:
wp-debugto true. No errors of note.
- Removed the entire directory, did a new
- Deactived all other plugins besides BuddyPress.
- Used the default BuddyPress theme.
- Installed version 3.6.1 (the last good version I used).
- Checked and rechecked directory permissions.
- I removed the avatars directory and when someone tries to upload an avatar it creates the avatars directory and the userid subdirectory but the image does not upload. The subdirectory remains blank. This is the error that is returned on the front end
Upload Failed! Error was: Unable to create directory wp-content/uploads/avatars/1407/avatars/1407. Is its parent directory writable by the server?As you can see it duplicates the avatars directory and the userid subdirectory for some reason. This happens on both the server and localhost. Localhost is displaying avatars properly however.
- Tinkered with birgire's suggestions below. Nothing.