A discussion about an issue with error message colors in Discourse. RichardC initially reported seeing error messages with a green background, which is the same color used for successful updates. RichardC provided a screenshot and suggested changing the error background color to light red.
After some investigation, RichardC found an instance where the error message was displayed on a red background, but later caught another error with a green background RichardC. angus asked for the specific error message that caused the green background, which RichardC couldn’t reproduce at first, but later shared a code snippet that caused the error RichardC.
angus clarified the circumstances of the error, and RichardC confirmed that the error occurs when using the discourse_publish_format_html filter with a specific code snippet. The error is not seen in other cases, and RichardC confirmed that no JavaScript errors are present in the web console.
The background for this message is green, but when there is an error message, it is also shown with a green background.
I think it would be preferable if the backgrounds for error messages were a different color, perhaps light red, to highlight the fact that something is wrong.
Just got another error message from the WP Plugin and this one was on a red background. So either this has been fixed, or not all error messages are the same, or I had some kind of caching issue.
@angus I really wish I could, but I fixed the error as soon as possible and I don’t know how to recreate it. I’ll be on the lookout and grab it if I ever see it again.
Thanks for following up! So just to be clear, you are saying you
can produce an incorrect error color;
when using the discourse_publish_format_html filter
in certain circumstances. On those circumstances, which of these is true:
you’re always seeing the error in green when using the filter; or
you’re always seeing the error in green when using the filter with the above snippet; or
you’re sometimes seeing the error in green when using the filter with the above snippet
Also, as you seem to have some other customisations (e.g. the 15 / 100 element), so just checking if you see any javascript errors in the web console when the incorrect color appears?