Make WordPress Core

Opened 8 years ago

Closed 8 years ago

#12318 closed defect (bug) (fixed)

Removing Last Tag in Quick Edit

Reported by: zachware Owned by: azaozz
Milestone: 3.0 Priority: normal
Severity: normal Version: 2.9.2
Component: Quick/Bulk Edit Keywords: has-patch needs-testing
Focuses: Cc:


In 2.9-beta-2 create a post with a tag (any tag.) Nav to Edit. Hover over the post and choose Quick Edit. You can remove any tags you want, but you are not allowed to remove the last tag. Upon clicking update the last tag will always remain, regardless of what tag it is.

Attachments (1)

12318.diff (533 bytes) - added by sivel 8 years ago.
Don't check if $tags_input is empty before running wp_set_post_tags, allow for removing all tags.

Download all attachments as: .zip

Change History (8)

#1 @sivel
8 years ago

This exists in 3.0 also. Quick edit seems to require that the tags field not be empty.

8 years ago

Don't check if $tags_input is empty before running wp_set_post_tags, allow for removing all tags.

#2 @sivel
8 years ago

  • Keywords has-patch needs-testing added
  • Milestone changed from 2.9.3 to 3.0

Moving milestone to 3.0, backport this the 2.9 branch if accepted.

#3 @nacin
8 years ago

I thought for sure I've seen this bug reported before, but I can't find a related ticket. If my memory serves me correctly, someone suggested that inserting a single space would force the tags to clear (which is true).

If anyone can find it, let's close one as a duplicate.

#4 @nacin
8 years ago

Bam: #11564.

Patch here looks better. Closing that as a duplicate.

#5 @aaron_guitar
8 years ago

Looks good to me.

#6 @nacin
8 years ago

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

Assigning to azaozz. I think this looks good, but he added the empty() check back in #6387 and I want to make sure we're all not missing something.

#7 @nacin
8 years ago

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

(In [14117]) Allow for removing all tags in quick edit. Check only if $tags_input isset (can be empty) before running wp_set_post_tags. props sivel, fixes #12318.

Note: See TracTickets for help on using tickets.