Opened 3 years ago
Closed 2 years ago
#15285 closed defect (bug) (fixed)
PHP notices when doing quick edit of link categories
| Reported by: |
|
Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1 |
| Component: | Taxonomy | Version: | 3.1 |
| Severity: | minor | Keywords: | has-patch commit |
| 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 (14)
solarissmoke — 3 years ago
comment:1
solarissmoke — 2 years ago
- Keywords close added; dev-feedback removed
This looks to have been fixed since I reported it
- Keywords close removed
- Milestone changed from Awaiting Review to 3.1
- Resolution set to fixed
- Status changed from new to closed
- Resolution fixed deleted
- Status changed from closed to reopened
It was never fixed apparently.
'quick_edit_custom_box' is also used on the posts list table. Thinking we should rename it.
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?
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
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 :-)
comment:10
nacin — 2 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.
comment:11
nacin — 2 years ago
- Keywords has-patch commit added
comment:12
nacin — 2 years ago
- Resolution set to fixed
- Status changed from reopened to closed

Change arguments passed to do_action for quick_edit_custom_box action