Make WordPress Core

Opened 12 years ago

Closed 11 years ago

#31241 closed defect (bug) (fixed)

Taxonomy error messages show success colors

Reported by: ninnypants Owned by: ocean90
Priority: normal Milestone: 4.2
Component: Taxonomy Version: 3.7
Severity: normal Keywords: good-first-bug has-patch commit
Cc: Focuses: ui

Description

When attempting to update a taxonomy fails the message is shown with a green update border instead of the red error border.

Steps to reproduce:

  1. Create two tags
  2. Edit the second tag
  3. Attempt to change the slug of the second tag to be the same as the first

After hitting update you will be take to the list of all tags and the message "Tag not updated." Will show with a green border.

Attachments (6)

Screen_Shot_on_2015-02-05_at_10_47_18.png (9.1 KB ) - added by ninnypants 12 years ago.
31241.diff (596 bytes ) - added by mzak 12 years ago.
Added conditional to check what message is returned, and set the class accordingly
31241.2.diff (588 bytes ) - added by mzak 12 years ago.
Use the message key, rather than the error string to determine which class to output
31241.3.diff (587 bytes ) - added by mzak 12 years ago.
Updated to comply with coding standards
31241.4.diff (1.4 KB ) - added by rahulbhangale 12 years ago.
Filtering of messages can be done by sending the message type with url parameter.
31241.5.diff (1.4 KB ) - added by SergeyBiryukov 12 years ago.

Download all attachments as: .zip

Change History (19)

#1 @SergeyBiryukov
12 years ago

  • Milestone Awaiting Review4.2
  • Summary Taxonomy error messages show succes colorsTaxonomy error messages show success colors

This ticket was mentioned in Slack in #core by ninnypants. View the logs.


12 years ago

#3 @SergeyBiryukov
12 years ago

  • Keywords needs-patch good-first-bug added

@mzak
12 years ago

Added conditional to check what message is returned, and set the class accordingly

#4 follow-up: @mzak
12 years ago

  • Keywords has-patch added; needs-patch removed

#5 in reply to: ↑ 4 @ninnypants
12 years ago

Replying to mzak:

31241.diff wont cover all other error instances. Maybe try using keys from the $messages array further up in that file.

@mzak
12 years ago

Use the message key, rather than the error string to determine which class to output

#6 @ninnypants
12 years ago

I have the patch 31241.2.diff working in trunk locally

@mzak
12 years ago

Updated to comply with coding standards

This ticket was mentioned in Slack in #core by ninnypants. View the logs.


12 years ago

#8 @helen
12 years ago

The messages can be filtered, and there are four different notice types (success, warning, error, info) - what could we do to support custom messages and varying notice types? That is probably a bigger picture thing, and applies to messages in other places, but I want us to be thinking about that.

@rahulbhangale
12 years ago

Filtering of messages can be done by sending the message type with url parameter.

#9 @DrewAPicture
12 years ago

  • Owner set to mzak
  • Status newassigned

#10 @SergeyBiryukov
12 years ago

  • Keywords commit added

Some cleanup in 31241.5.diff.

This ticket was mentioned in Slack in #core by drew. View the logs.


11 years ago

#12 @ocean90
11 years ago

  • Owner changed from mzak to ocean90
  • Status assignedaccepted

#13 @ocean90
11 years ago

  • Resolutionfixed
  • Status acceptedclosed

In 31823:

Edit Terms: Show error messages actually as error messages.

props rahulbhangale, SergeyBiryukov.
fixes #31241.

Note: See TracTickets for help on using tickets.