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 Me gusta

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 Me gusta

Esto sucede after_save pero usa will_save_change, así que estoy bastante seguro de que nunca se activa. Parece que antes sí lo hacía, pero este commit de 2017 (supongo que por error) cambió de _changed a will_save_change.

3 Me gusta

Creo que también tenemos un par de temas de Bug aquí:

4 Me gusta

¡Gracias @dsims por encontrar la causa raíz de este problema! He creado una PR con una solución.

4 Me gusta

Este tema se cerró automáticamente después de 4 días. Ya no se permiten nuevas respuestas.