Vecchi avatar utente nel testo citato?

Non sono sicuro se si tratti proprio di un bug o solo di un comportamento che non capisco appieno, ma sembra che citare qualcuno in un post memorizzi il suo avatar al momento della citazione. Come qui:

Sembra che questo possa essere un regresso di quanto riportato qui:
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 Mi Piace

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 Mi Piace

Questo accade after_save ma usa will_save_change, quindi sono abbastanza sicuro che non si attivi mai. Sembra che prima funzionasse ma questo commit del 2017 (presumo erroneamente) è passato da _changed a will_save_change.

3 Mi Piace

Penso che abbiamo anche un paio di argomenti di Bug qui:\n\nhttps://meta.discourse.org/t/quote-s-use-incorrect-user-avatar-after-changing-avatar/286750\n\nhttps://meta.discourse.org/t/profile-image-changing-bug/217184

4 Mi Piace

Grazie @dsims per aver trovato la causa principale di questo problema! Ho creato una PR con una correzione.

4 Mi Piace

Questo argomento è stato chiuso automaticamente dopo 4 giorni. Non sono più ammessi nuovi messaggi.