Make WordPress Core

Opened 7 years ago

Last modified 5 years ago

#29821 new defect (bug)

bulk_edit_custom_box hook causes tags to display within created fieldset

Reported by: webgeekconsulting Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version: 4.0
Component: Quick/Bulk Edit Keywords:
Focuses: Cc:


I have a custom post type that I am trying to add some fields to for bulk editing. My fieldset displays, but the tags field somehow is getting inserted into the fieldset being generated. It's extremely strange.

Bulk Edit panel without my fieldset:

Bulk Edit panel with my fieldset:

My code to generate the bulk edit custom box:

	 * Display the custom bulk edit box
	 * @since 3.0
	 * @access public
	 * @action bulk_edit_custom_box
	public function bulk_edit_custom_box( $column_name, $post_type ) {
		if ( $post_type != MP_Product::get_post_type() || $column_name != 'product_price' ) {
<fieldset id="bulk-edit-col-product-price" class="inline-edit-col-left" style="clear:left">
	<div class="inline-edit-col clearfix">
		<label class="alignleft"><span class="title"><?php _e('Price', 'mp'); ?></span><span class="input-text-wrap"><input type="text" name="product_price" style="width:100px" /></span></label>
		<label class="alignleft" style="margin-left:15px"><span class="title"><?php _e('Sale Price', 'mp'); ?></span><span class="input-text-wrap"><input type="text" name="product_sale_price" style="width:100px" /></span></label>
		<input type="hidden" name="bulk_edit_product_nonce" value="<?php echo wp_create_nonce('bulk_edit_product'); ?>" />		

This is the code that is being generated in my debugger:

<fieldset id="bulk-edit-col-product-price" class="inline-edit-col-left" style="clear:left"><label class="inline-edit-tags">
				<span class="title">Product Tags</span>
				<textarea cols="22" rows="1" name="tax_input[product_tag]" class="tax_input_product_tag"></textarea>
	<div class="inline-edit-col clearfix">
		<label class="alignleft"><span class="title">Price</span><span class="input-text-wrap"><input name="product_price" style="width:100px" type="text"></span></label>
		<label class="alignleft" style="margin-left:15px"><span class="title">Sale Price</span><span class="input-text-wrap"><input name="product_sale_price" style="width:100px" type="text"></span></label>
		<input name="bulk_edit_product_nonce" value="5e55f56276" type="hidden">		

Notice how the tags field is being inserted into my fieldset. It seems as thought the tags field is being inserted via javascript into whatever the last fieldset in the panel is.

Here's the same fields in the quick edit panel:

This is how it should show up.

Change History (4)

#1 @DrewAPicture
7 years ago

  • Component changed from General to Taxonomy

#2 @nacin
7 years ago

  • Component changed from Taxonomy to Quick/Bulk Edit

#3 @barrykooij
6 years ago

I'm having this issue as well in WP 4.3. Did anyone ever look into this?

#4 @adamsilverstein
5 years ago

  • Focuses javascript removed
Note: See TracTickets for help on using tickets.