Automattic / Automattic/jetpack
Comments: Default Gravatar icon breaks when a valid e-mail is not found
- Dominant language
- PHP
- Stars
- 1.8k
- Forks
- 898
- Avg merge
- 1d 18h
- Merged PRs (30d)
- 774
Description
This problem only seems to affect sites where the default user icon has been set to Gravatar.
There are two ways to reproduce this error:
1. Make sure you're logged out
2. Focus on the comment area in an article
3. Fill in something random in the e-mail field or leave it empty
4. Press tab (or click) to jump to the next field
5. Gravatar image breaks
Looking at the actual image tag, here's what changed:
Before (working image):
``` html
```
After (broken image):
``` html
```
When trying to view that last image in the browser (without the &s), Gravatar gives this error:
"_Sorry, the parameters you provided were not valid_"
Alternative way:
1. Make sure you're logged in with a WordPress.com account
2. Focus on the comment area
3. Click on the `Log Out` or `Change` links at the bottom of the commenting area (both do the same)
4. Gravatar image breaks
The resulting image is:
``` html
```
Curiously enough, the second method doesn't break if you log-in from the comment module itself using a WordPress.com account, but that's probably because it pre-fills all the fields with the information it gets from your profile when you log-out again. Incidentally, when you've logged-in to WordPress.com from elsewhere and log-out through the comment module on another site, the fields are left empty and the default image is left broken.
Tested on multiple browsers and languages versions.
Contributor guide
Research direction
The issue names the comment area and Gravatar image URL but no source file or test. Reproduce both logged-out flows, then trace where the default Gravatar URL is assembled; done means the fallback image remains valid when the email is empty or unknown, including after logging out through the comment module.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php, wordpress
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100