Old user avatars in quoted text?

I’m not sure if this is quite a bug, or just some behaviour that I don’t quite get, but it appears that quoting someone in a post stores their avatar at that point in time with the quote. Like here:

It seems like this might be a regression of this thing:
https://meta.discourse.org/t/after-changing-avatar-quotes-still-show-the-old-avatar/21122

Not a bug; it’s always been that way.

2개의 좋아요

I suppose its because the posts are baked with the URL at the time. Do you want a fix for this, or is it too potentially resource intensive to trigger a rebake each time someone changes their avatar?

Changing the avatar already triggers a rebake of posts containing quotes, but it’s currently quite resource intensive to find and rebake all posts. So, it’s possible that some of them won’t be updated. Post revisions aren’t updated at all.

I have plans to fix all of this when I’m working on improvements for user renaming/anonymizing in one of the next releases. It will require a new table that keeps track of all the places where a user is quoted, mentioned, oneboxed, and what not.

If you want to work on this, please keep in mind that rebaking just to update the avatar isn’t needed. I’d suggest reusing code from UpdatUsername. It’s a lot faster.

8개의 좋아요

이것은 after_save에서 발생하지만 will_save_change를 사용하므로 실제로는 절대 트리거되지 않는다고 확신합니다. 이전에는 작동했던 것 같지만, 2017년의 이 커밋에서 (아마도 실수로) _changed에서 will_save_change로 변경되었습니다.

3개의 좋아요

이것에 관해서도 Contribute > Bug 토픽이 몇 개 있는 것 같습니다:

4개의 좋아요

@dsims 님, 이 문제의 근본 원인을 찾아주셔서 감사합니다! 수정 사항을 담은 PR을 생성했습니다.

4개의 좋아요

이 주제는 4일 후 자동으로 닫혔습니다. 더 이상 새로운 답변을 작성할 수 없습니다.