[wp-trac] [WordPress Trac] #28033: post_categories_meta_box on non-hierarchical custom taxonomy
WordPress Trac
noreply at wordpress.org
Wed Oct 29 21:08:42 UTC 2014
#28033: post_categories_meta_box on non-hierarchical custom taxonomy
----------------------------------------+---------------------------------
Reporter: ByronicEntity | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: Taxonomy | Version: 3.9
Severity: normal | Resolution:
Keywords: needs-patch good-first-bug | Focuses: ui, administration
----------------------------------------+---------------------------------
Comment (by rufein):
I've done my first ticket.
The documentacion in `register_taxonomy()` says explicitly:
meta_box_cb - Provide a callback function for the meta box display.
If not set, defaults to post_categories_meta_box for hierarchical
taxonomies
and post_tags_meta_box for non-hierarchical.
The author of this ticket is setting manually the wrong function to manage
non-hierarchical terms.
I've reproduced the error and when an user create throungh Ajax a new
term, the upper function creates the output reported in this thread. When
the Ajax call is executed in server, it creates a new term that stores in
database. At the end of the proccess, it creates options to be added to
the form, but the function duplicate it because it also attach a parent
option that not exist. So, finally, ajax add an non-existing term to the
form. If you submit a non-existing term in the form, it will be created.
If not, it will disappear.
I've created a patch to avoid that function `post_categories_meta_box()`
being assigned to a non-hierarchical taxonomies.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/28033#comment:5>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list