Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/231 Broken default avatar when Local Avatars Only is unchecked #260

Merged
merged 1 commit into from
Mar 11, 2024

Conversation

faisal-alvi
Copy link
Member

@faisal-alvi faisal-alvi commented Feb 28, 2024

Description of the Change

When the 'Local Avatars Only' setting is unchecked (i.e., disabled), the 'Default Avatar' setting was not being applied. Consequently, the gravatar was returned for images when no original image was set, resulting in broken avatars for users whose gravatar was not set.

This PR addresses this issue by displaying the 'Default Avatar' even when the 'Local Avatars Only' setting is disabled.

image

before

image

after

image

Closes #231

How to test the Change

  1. Go to the avatar settings /wp-admin/options-discussion.php.
  2. Choose the option to upload a custom image as your avatar.
  3. Upload a custom image.
  4. Make sure to untick the Local Avatars Only option.
  5. Save the changes.
  6. View the user's profile or avatar in various parts of the system.
  7. There should not be any broken avatar images and the default avatar image should be shown as a fallback image.

Changelog Entry

Fixed - Broken default avatar when ' Local Avatars Only` is unchecked.

Credits

Props @ankitguptaindia @faisal-alvi

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@faisal-alvi faisal-alvi added this to the Future Release milestone Feb 28, 2024
@faisal-alvi faisal-alvi self-assigned this Feb 28, 2024
@github-actions github-actions bot added the needs:code-review This requires code review. label Feb 28, 2024
@faisal-alvi faisal-alvi requested review from a team and Sidsector9 and removed request for dkotter, jeffpaul and a team February 28, 2024 11:29
@jeffpaul jeffpaul modified the milestones: Future Release, 2.8.0 Feb 28, 2024
@qasumitbagthariya
Copy link
Contributor

QA Update ✅


@faisal-alvi Thanks for the PR

I have verified that the associated problem in the fix/231 branch has been fixed and is functioning as intended.

Video:
https://drive.google.com/file/d/15pPXeAFS4faECYrzh-7d8yN3DkQ0nWfk/view?usp=sharing

Testing Environment

  • WordPress: 6.4.3
  • Theme: Twenty Twenty-FourVersion: 1.0
  • PHP: 8.0.30
  • Web Server: Nginx 1.20.2
  • Browser: Chrome
  • OS: macOS Ventura 13.3

@faisal-alvi faisal-alvi merged commit bcaefb4 into develop Mar 11, 2024
15 checks passed
@faisal-alvi faisal-alvi deleted the fix/231 branch March 11, 2024 11:14
@faisal-alvi faisal-alvi modified the milestones: 2.8.0, 2.7.8 May 8, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs:code-review This requires code review.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

The default avatar is displayed as a broken for all users when the custom image option is selected.
3 participants