Opened 16 months ago
Last modified 7 months ago
#19954 new defect (bug)
wp_insert_post should look if default category is nessesary
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Future Release |
| Component: | Post Types | Version: | |
| Severity: | normal | Keywords: | has-patch |
| Cc: | markoheijnen, t.herzog@… |
Description
When creating an post object with get_default_post_to_edit(), wp_insert_post() will ignored the set category.
It doesn't look if the post has already a good category.
Attachments (1)
Change History (8)
markoheijnen — 16 months ago
comment:2
hughwillfayle — 15 months ago
- Cc t.herzog@… added
Why should this be? WordPress sets category to the default one if there hasn't been setted one.
Could we have some example code that triggers this?
Is this an issue to fix/benefit XML-RPC changes in 3.4 at this point?
comment:5
markoheijnen — 14 months ago
I don't believe it is xml-rpc related. What I did was adding the category with the metod wp_set_object_terms() on the post ID what you get from get_default_post_to_edit(). I know thisis a rare condition.
comment:7
markoheijnen — 7 months ago
#22220 was marked as a duplicate.
Note: See
TracTickets for help on using
tickets.

Does fix the issue. Maybe need better formating