The user nexo is trying to change the solved icon across their Discourse site but is facing issues with it not updating in certain areas like notifications and post controls. awesomerobot explains that some icons require specific names, such as notification.solved.accepted_notification, and provides a code example. tshenry clarifies that the post control icon uses a generic name and can be changed globally, but the user’s attempt to modify it specifically leads to visibility issues for non-admin users. tshenry suggests a more targeted approach by overriding the addPostMenuButton function, which nexo confirms partially works, though the icon change still doesn’t display correctly for non-admins. tshenry acknowledges the issue and updates the script, but the problem persists, indicating a deeper issue with how the icon is rendered for different user roles.
Are you trying to change it specifically for that icon location and state? If you are still trying to change the icon globally the code you originally posted is still correct:
Specifically in that area, because as Kris aforementioned, sometimes the code has to be very specific. This is all the code I’ve added for changing icons:
As Kris mentioned, only some icons need special treatment. Notifications are one of those, so that’s why you needed to use notification.solved.accepted_notification. In the case of the solved icon in the post controls, it’s using the generic icon name, so you will only be able to change it globally when using the replaceIcon method.
If you want to get really specific, I think you will need to override the addPostMenuButton function that’s defined in the solved plugin. Try this:
This works, but oddly this script makes it so only me with the admin account can see the topic with a solved reply, any other users are unable to see it.