#15285 closed defect (bug) (fixed)
PHP notices when doing quick edit of link categories
Reported by: | solarissmoke | Owned by: | |
---|---|---|---|
Milestone: | 3.1 | Priority: | normal |
Severity: | minor | Version: | 3.1 |
Component: | Taxonomy | Keywords: | has-patch commit |
Focuses: | Cc: |
Description
I was editing some link categories (debug enabled) and came across the following when trying to "quick edit" a category:
PHP Notice: Undefined variable: type in \wp-admin\includes\class-wp-terms-list-table.php on line 344 PHP Notice: Undefined property: stdClass::$taxonomy in \wp-admin\includes\class-wp-terms-list-table.php on line 344
These are passed to the quick_edit_custom_box action - remnants from the old inline_edit_term_row function which has been removed - see #14579.
Proposed patch to follow, although I'm not confident it's appropriate.
Attachments (2)
Change History (15)
#1
@
14 years ago
- Keywords close added; dev-feedback removed
This looks to have been fixed since I reported it
#2
@
14 years ago
- Keywords close removed
- Milestone changed from Awaiting Review to 3.1
- Resolution set to fixed
- Status changed from new to closed
#3
@
14 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
It was never fixed apparently.
#5
follow-up:
↓ 6
@
14 years ago
'quick_edit_custom_box' is also used on the posts list table. Thinking we should rename it.
#6
in reply to:
↑ 5
@
14 years ago
Replying to scribu:
'quick_edit_custom_box' is also used on the posts list table. Thinking we should rename it.
Is one of these new in 3.1 or did we have this issue in 3.0?
#7
follow-up:
↓ 8
@
14 years ago
Checked 3.0 branch:
quick_edit_custom_box was only previously used in inline_edit_term_row so we should rename the one in the posts list table to be unique
#8
in reply to:
↑ 7
@
14 years ago
Replying to westi:
Checked 3.0 branch:
quick_edit_custom_box was only previously used in inline_edit_term_row so we should rename the one in the posts list table to be unique
Scratch that:
3.0 branch:
./wp-admin/includes/template.php: do_action( 'quick_edit_custom_box', $column_name, $type, $taxonomy ); ./wp-admin/includes/template.php: do_action( $bulk ? 'bulk_edit_custom_box' : 'quick_edit_custom_box', $column_name, $screen->post_type
inline_edit_row && inline_edit_term_row
Trunk:
./wp-admin/includes/class-wp-posts-list-table.php: do_action( $bulk ? 'bulk_edit_custom_box' : 'quick_edit_custom_box', $column_name, $screen->post_type ); ./wp-admin/includes/class-wp-terms-list-table.php: do_action( 'quick_edit_custom_box', $column_name, $tax->name );
So we have to live with these :-)
#10
@
14 years ago
- Resolution fixed deleted
- Status changed from closed to reopened
Noticed via #16046, I see a regression.
In 3.0, inline_edit_term_row() took $type ('edit-tags', 'categories', or 'edit-link-categories') and $taxonomy.
In 3.0 we didn't account for the merger of 'edit-tags' and 'categories'. It appears people didn't rely on this argument as we hadn't seen a report. That's fine with me.
But, the taxonomy argument has now moved. That's a problem for people adding custom column data here.
We should just pass 'edit-tags' consistently and bump the argument down one. This is also helpful to distinguish between post type and taxonomy usage of the filter.
Change arguments passed to do_action for quick_edit_custom_box action