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

Broken commenter or follower icon/avatar #568

Closed
janboddez opened this issue Nov 20, 2023 · 3 comments
Closed

Broken commenter or follower icon/avatar #568

janboddez opened this issue Nov 20, 2023 · 3 comments
Labels
Needs triage [Type] Bug Something isn't working

Comments

@janboddez
Copy link
Contributor

janboddez commented Nov 20, 2023

Quick summary

I've seen broken images for followers or commenters that delete or update their avatar (URL). Not sure if these image URLs get stored in a transient only or if they also end up in the database.

Actually, I think for comments they are stored in the avatar_url custom field.

Quick sidenote: I've been experimenting with storing avatars locally, and then storing the local URL in avatar_url.

My idea was to keep the image around for, say, a month, before possibly overwriting it. Of course if the remote account switched to another image (URL), and a new comment came in, we'd keep the old avatar around and switch to the new one for the new comment. (Well, I guess we could also do a more thorough search/update.)

In fact, the above (using a custom filter to cache avatars locally) is a perfectly acceptable workaround for me personally. Just thought I'd mention what I'd noticed.

Another solution would be to regularly clean up/refetch avatar URLs for commenters and followers.

I think, for followers, the avatar URLs might get stored in a transient only, and would thus auto-refresh when that expired (after a week or whenever the transient is flushed).

If that is indeed the case, I guess I can live with flushing my site's transients (or simply letting them expire), and letting the plugin refetch/update actor data.

Another solution would be to fall back to a "default" avatar; however, this may require verifying the existence of the remote file, which seems quite wasteful.

Steps to reproduce

  1. Use a dummy Mastodon (or similar) account to follow your blog. Then delete its avatar (over on the Mastodon back end).
  2. Refresh, in WordPress, your followers list.
  3. Notice a broken image (if it isn't cached at the Mastodon instance's CDN level, etc.).

I think something similar happens to comments.

What you expected to happen

Ideally, the avatar would get updated, or a fallback image is shown (rather than a broken image).

What actually happened

Broken image.

Impact

All

Available workarounds?

Yes, difficult to implement

Logs or notes

No response

@janboddez janboddez added [Type] Bug Something isn't working Needs triage labels Nov 20, 2023
@janboddez
Copy link
Contributor Author

I think the follower updater fixes this? Is that right?

@pfefferle
Copy link
Member

There are currently two features that fix broken/updated images, one is the cron that updates followers from time to time and the other one is, that the current master (should rename it to main or trunk finally) version (will be released as 2.0.0 next week) supports profile update activities.

@janboddez
Copy link
Contributor Author

Yes, seems like the broken avatar that led me to create this issue got updated by the cron job, so I'll just close this ;-P

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs triage [Type] Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants