Opened 15 years ago
Closed 15 years ago
#13397 closed defect (bug) (fixed)
Bulk Edit - Changing cats kills tags
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | 3.0 | Priority: | normal |
Severity: | blocker | Version: | 3.0 |
Component: | General | Keywords: | |
Focuses: | Cc: |
Description
I've got two posts, neither are in a category.
Post 1 - tags1, tag2
Post 2 - tag3, tag4
I select both to bulk edit and put them in the same cat. I click on CAT1 and hit save.
They're both in the same cat now, but all my tags are done.
You are using WordPress 3.0-beta2-14565. <<
Running single site.
Attachments (3)
Change History (16)
#2
follow-up:
↓ 5
@
15 years ago
- Milestone changed from Unassigned to 3.0
- Severity changed from normal to blocker
I can't reproduce.
However, I am discovering two other quick/bulk edit bugs here. One of them is a regression, the other exists in 2.9.
- Attempt to remove all categories from a post via Quick Edit. Expected: all will be removed. Actual: None will be removed. Sounds like maybe it is expecting Uncategorized to remain (or become) checked in that case. This is 2.9 and 3.0.
- In 3.0, I am unable to add categories via Bulk Edit. They simply won't save. This is a regression and cripples hierarchical taxonomy handling in Quick Edit. Marking as blocker for this reason.
#3
@
15 years ago
With regards to the blocker, it looks like we're still using old post_category[] markup. there, instead of the new tax_input[category][]. A custom hierarchical taxonomy saves just fine as it uses the newer markup. Seems simple to patch.
#4
@
15 years ago
Per nacin's suggestion, I upgraded to the latest nightly.
I confirm his issue with not being able to add categories AND that my editing no longer munches my tags.
#5
in reply to:
↑ 2
;
follow-up:
↓ 6
@
15 years ago
Replying to nacin:
- Attempt to remove all categories from a post via Quick Edit.
Since its introduction Quick Edit only adds tags and categories. There were talks about implementing removal too but that was never a high priority. There are some UX questions too: shall we add extra boxes with the existing cats, tags, etc. (that may be more confusing) or shall we add a red checkbox above the existing cats saying "Remove checked categories from the selected posts". Or perhaps radio buttons Add (default) / Remove.
#6
in reply to:
↑ 5
;
follow-up:
↓ 9
@
15 years ago
Replying to azaozz:
Replying to nacin:
- Attempt to remove all categories from a post via Quick Edit.
Since its introduction Quick Edit only adds tags and categories. There were talks about implementing removal too but that was never a high priority. There are some UX questions too [...]
I imagine you're referring to Bulk Edit. I agree with its current functionality.
I'm referring to Quick Edit. It prepopulates so you can remove/add at will. The only thing you can't do is remove all categories from a post, presumably due to code that handles removing the default category. So if you try to remove the Fruit category and Uncategorized, it won't remove either (if it has no other categories beyond those two). If you try to remove just Fruit, it'll do so. It's an odd case of functionality presumably due to the default category, and I'm much less concerned about that. (It's also not a regression.)
#7
follow-up:
↓ 11
@
15 years ago
As suggested change markup to new tax_input, doesn't fix quick edit cat removal.
#8
follow-up:
↓ 10
@
15 years ago
I think the reason for Quick Edit not allowing you to remove all categories is because the jQuery serialize method doesn't pickup the catgories if all the boxes are unchecked (see inline-edit-post.js)
#9
in reply to:
↑ 6
@
15 years ago
Replying to nacin:
I imagine you're referring to Bulk Edit. I agree with its current functionality.
You're right. Got confused by the ticket's title, sry.
#10
in reply to:
↑ 8
@
15 years ago
Replying to duck_:
I think the reason for Quick Edit not allowing you to remove all categories is because the jQuery serialize method doesn't pickup the catgories if all the boxes are unchecked (see inline-edit-post.js)
I tell a lie... in fact it's to do with how wp_update_post
handles an empty post_category[] array. Patch uses the trick used in the categories meta-box of adding an input with a fake term id.
#11
in reply to:
↑ 7
@
15 years ago
Replying to duck_:
As suggested change markup to new tax_input, doesn't fix quick edit cat removal.
As discussed on IRC the changing the markup isn't the main issue.
The way wp_insert_post
works is by setting categories from post_category first and then from tax_input[category] so when bulk_edit_posts
sets tax_input[category] after the new cats passed from the checkboxes any changes are accidentally overwritten in wp_insert_post
.
Tag are GONE. Not done. Dude. Sleep moar!