Letter A is the only avatar showing up
-
Love the plugin ?? However, I just went to WordPress 4.2, Buddypress Version 2.2.3.1, and BuddyPress First Letter Avatar Version 1.0.3 and the users get an A.
I have these settings:
Letter index: 0
Use Gravatars: unchecked
Use JavaScript for Gravatars: uncheckedSince the above updates, all default avatar users get an “A”. Changing to my custom avatar folder doesn’t help. Firebug indicates that it’s still looking at Gravatar, but based on the above, I don’t have any Gravatar options turned on.
https://www.ads-software.com/plugins/buddypress-first-letter-avatar/
-
Hello,
Can you tell me thealt
attribute of example avatar? Unfortunately, BuddyPress does not provide any useful functions/filters to get user data, so this plugin gets user name from avatar’s<img />
tag. Usually thealt
attribute looks something like this:"Picture of [username]"
– then I know that user’s name is [username].Please check the
alt
attribute of couple of avatars in Inspect element feature in Chrome/Firefox/Opera/IE and let me know what it is.Hi, and thanks for responding so quickly! Here are a couple. In firebug, the alt shows the exact user name (ex. John Doe), but for our purposes here I made it generic by replacing the exact user name with <FirstName LastName>, the string in the gravatar link with <User Image Name>, and the site name as well.
<img class=”avatar user-12-avatar avatar-50 photo” width=”50″ height=”50″ alt=”Profile picture of <FirstName LastName>” src=”https://gravatar.com/avatar/<User Image Name>?d=https://<Site Name>.com/wp-content/plugins/buddypress-first-letter-avatar/images/bp-first-letter-avatar.png&s=50&r=G”>
<img class=”avatar user-4-avatar avatar-50 photo” width=”50″ height=”50″ alt=”Profile picture of <FirstName LastName>” src=”https://gravatar.com/avatar/<User Image Name>?d=https://<Site Name>.com/wp-content/plugins/buddypress-first-letter-avatar/images/bp-first-letter-avatar.png&s=50&r=G”>
Hope this helps
I don’t quite understand why it’s happening… It’s as if the filter applied by BuddyPress First Letter Avatar didn’t work. Instead, it only uses the default avatar set in Settings > Discussion page in WordPress. Have you been using my plugin before? Was it fully functional before? Aren’t you using any plugins that may be disabling avatar filter applied by my plugin?
I don’t have any plugins that directly affect avatars (that I know of). I was using the previous version of First Letter Avatar with no problems. I went to WP 4.2 and then to BuddyPress and then to First Letter without doing a whole lot of checking in between, but everything seemed fine. Once I noticed the problem, I disabled/enabled First Letter, then went into Settings Discussion and set First Letter to be on, which didn’t help. I disabled/enabled again, then deleted the plugin and reinstalled it, and got the same thing. By the way, I tried checking round avatars, and it had no effect.
Just a thought, but would security software have something to do with it, like the plugin wants to do something and the software isn’t letting it?
Just a thought, but would security software have something to do with it, like the plugin wants to do something and the software isn’t letting it?
Very unlikely.
This is the first time I’m getting this kind of report, so it’s difficult for me to say where the problem may be. It seems that hooks are not activated properly – not only the avatar filter does not work (because your avatar is set to the A letter, which should only be seen in Settings page), but also it seems that CSS is not attached properly. But the CSS thing may just be the fact that some other styles is overriding my CSS rules.
I cannot see any other way of getting into the root of the problem other than disabling all other plugins to see if it changes anything.
Does Chrome/Firefox console give you any errors? Missing CSS/JS files, some 404 errors somewhere? If you want you can send me your website address to
danielagw.wp
AToutlook
DOTcom
so I could take a quick look to see if files are enclosed properly etc.Hey,
I have the same issue. I think its with the new BP upgrade (but they released like two in a week so I’m not sure which one it is). Everything was working fine but once I upgraded every avatar was an A. On both a premium theme and a default WP one even without other plugins (except BP of course). The alt tag also had the right name.
But anywho, my quick fix was to go back a version of the plugin. Version 1.0.2 works if you want to give that a try Joe.
That’s interesting. And I don’t know what is more interesting – the fact that it works for me without any problems or the fact that 1.0.2 doesn’t have this problem. I didn’t do any radical changes in 1.0.3, and I can’t think of any small modification that could be causing this… I’ll look into this again. Thanks for the info.
No problem and great plugin btw!
Like IHaveToDoThis, I did some troubleshooting by removing plugins, only leaving Buddypress and First Letter, and still had the problem. Also, First Letter was working fine on 1.02, and when I went to 1.03 I got the issue. Thanks for the 1.02 tip IHaveToDoThis, but I don’t see where I can find the file for 1.02, and installing via “add new plugin” in the back end only shows 1.03. I happened to go to the wordpress plugin page (https://www.ads-software.com/plugins/wp-first-letter-avatar/), and right now you’ll see a download for 1.2.7. I downloaded it and did the manual install where you upload the file, via the back end. Not that it helped. The most I can get it to do is to look nearly right in the back end, and wrong in the front end. What I mean is that in the back end when you go under all users, you see all users with First Letter avatars, whether they have their own personally uploaded avatar or not. Viewed from the front end, the users with personal avatars show their personal avatar properly, but the rest (ie. default avatars) show all as First Letter “A” avatars.
Hey Joe,
Go to the developers tab on the plugin homepage and there you’ll find all the versions of the plugin. You should be able to download 1.0.2 and upload it like a normal plugin.
Took me awhile to figure out where they keep the older versions as well ??
Okay guys, I see the problem seems to be escalating, so there must be something I’m missing. Good to know that 1.0.2 works – it gives me a good starting point in my debugging process. Interesting that the more popular non-BuddyPress version of this plugin, WP First Letter Avatar seems to be working without this issue. Their core is basically the same…
I’ll do my best to find the problem and eliminate it as soon as possible.Thanks for all reports.
Daniel
EDIT: If somebody has problems locating 1.0.2 version, I’ve started a new sticky thread to make it easier – IMPORTANT – Only letter A showing up
Guys, I’ve been testing plugin for two hours in various environments and I cannot recreate this error. Everything works flawlessly for me. I have latest BuddyPress, latest WordPress and BuddyPress First Letter Avatar 1.0.3 (latest). Every user gets their own avatar – whether it’s letter A or B or C or D, everything just works. I cannot think of anything that could by causing it.
What PHP versions are you guys using?
I have one suspicion regarding where this may be coming from. Your problem is that the filter that adds default avatar works (which is just a letter A), but the other filter that is actually responsible for replacing avatars with some logic behind it doesn’t work. The only way that I can think of that may be causing this is because of line 66 in my code. There is a condition that checks default avatar in database and if the condition is not met, the function (constructor) returns nothing (ends plugin execution).
The important part:
If any of you guys experiencing the problem know just a tiny bit PHP and is willing to help me debug this issue, please contact me at:danielagw.wp
AToutlook
DOTcom
. All it takes is just print (var_dump or echo) two variables in one place of the code and tell me what they look like. It won’t take longer than 1 minute. If I know what these two variables look like, I will probably be able to solve this problem.
So if any of you have spare 1 minute to help open source community it would be highly appreciated ??Thanks IHaveToDoThis. I just tried something Daniel sent me to test, and it worked. In version 1.03’s buddypress-first-letter-avatar.php, look at lines 66-68. You’ll have:
if ($avatar_default != $plugin_avatar){ // if first letter avatar is not activated in settings > discussion page...
return; // cancel plugin execution
}
Delete the code on line 67, which is
return; // cancel plugin execution
which leaves this:
if ($avatar_default != $plugin_avatar){ // if first letter avatar is not activated in settings > discussion page...
}
Hopefully it works for everyone else as well.That’s great news, thanks. Well, I’m going to remove this feature in the next release. It’s all because of the default avatar setting on Settings > Discussion page. I guess it is causing some problems…
I’m marking this one as resolved – next release will include the fix.
Thank you for your help, Joe.
- The topic ‘Letter A is the only avatar showing up’ is closed to new replies.