Post attributes not correctly set on staged posts when saved?

AI-generated summary

A discussion was started by lukegb regarding an issue with post attributes not being set correctly when a post is saved from the composer. Specifically, user class attributes like staff and primary_group_name are not included in the subset of attributes set by the composer. eviltrout considered it a bug and suggested ensuring properties set after saving are the same as when refreshing the page. A year later, codinghorror inquired if the issue was still present, and eviltrout responded that they had not heard any complaints, but suspected some properties might still be affected.

I’ve noticed that the user class attributes don’t seem to be set correctly (on the poster-name component) when a post is saved from the composer. Obviously the issue goes away when the page is refreshed and it’s only evident for the person who posted it, but it’s annoying none-the-less - we apply some theming based on a user’s primary group.

I note that a subset of a post’s attributes are set here:

but that doesn’t include attributes like staff or primary_group_name.

Is this an actual bug or expected behaviour? What would be the correct way to fix it - just add the new attributes, or replace the post in the post stream with the version of the post from the server?

3 Likes

@eviltrout your thoughts?

It certainly sounds like a bug to me. However, some properties might come back from the server in the response and will be set that way.

We should do what we can to make sure that the properties set after saving succeeds are the same as when refreshing the page.

3 Likes

Is this still an issue, one year later?

1 Like

I haven’t heard any complaints about it. I suspect there are some properties that still work this way – I’m just not sure if they result in any particular bugs.

1 Like