Make WordPress Core

Opened 10 years ago

Closed 10 years ago

#31241 closed defect (bug) (fixed)

Taxonomy error messages show success colors

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

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 10 years ago.
31241.diff (596 bytes) - added by mzak 10 years ago.
Added conditional to check what message is returned, and set the class accordingly
31241.2.diff (588 bytes) - added by mzak 10 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 10 years ago.
Updated to comply with coding standards
31241.4.diff (1.4 KB) - added by rahulbhangale 10 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 10 years ago.

Download all attachments as: .zip

Change History (19)

#1 @SergeyBiryukov
10 years ago

  • Milestone changed from Awaiting Review to 4.2
  • Summary changed from Taxonomy error messages show succes colors to Taxonomy error messages show success colors

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


10 years ago

#3 @SergeyBiryukov
10 years ago

  • Keywords needs-patch good-first-bug added

@mzak
10 years ago

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

#4 follow-up: @mzak
10 years ago

  • Keywords has-patch added; needs-patch removed

#5 in reply to: ↑ 4 @ninnypants
10 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
10 years ago

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

#6 @ninnypants
10 years ago

I have the patch 31241.2.diff working in trunk locally

@mzak
10 years ago

Updated to comply with coding standards

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


10 years ago

#8 @helen
10 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
10 years ago

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

#9 @DrewAPicture
10 years ago

  • Owner set to mzak
  • Status changed from new to assigned

#10 @SergeyBiryukov
10 years ago

  • Keywords commit added

Some cleanup in 31241.5.diff.

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


10 years ago

#12 @ocean90
10 years ago

  • Owner changed from mzak to ocean90
  • Status changed from assigned to accepted

#13 @ocean90
10 years ago

  • Resolution set to fixed
  • Status changed from accepted to closed

In 31823:

Edit Terms: Show error messages actually as error messages.

props rahulbhangale, SergeyBiryukov.
fixes #31241.

Note: See TracTickets for help on using tickets.