[wp-trac] [WordPress Trac] #37028: Taxonomy terms array to string conversion in class-wp-ajax-response.php
WordPress Trac
noreply at wordpress.org
Sat Jun 4 16:15:50 UTC 2016
#37028: Taxonomy terms array to string conversion in class-wp-ajax-response.php
-------------------------------+------------------------------
Reporter: esemlabel | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Taxonomy | Version: 4.5.2
Severity: normal | Resolution:
Keywords: reporter-feedback | Focuses:
-------------------------------+------------------------------
Changes (by boonebgorges):
* keywords: => reporter-feedback
Comment:
Hi @esemlabel - Can you please provide more details? I can't reproduce,
and I'm unsure how this would happen on a default installation of
WordPress.
Here's what I tried:
1. Register a custom taxonomy 'foo'
2. Create a term in the taxonomy at `wp-admin/edit-tags.php?taxonomy=foo`
3. Hover over the newly created term in the list table and click delete
4. Term is deleted as expected
Is this what you're doing?
The AJAX handler that WP uses when deleting a term in this way doesn't
even create a `WP_AJAX_Response` object, so I'm unsure how deleting would
cause the notice you've described.
https://core.trac.wordpress.org/browser/tags/4.5.2/src/wp-admin/includes
/ajax-actions.php#L579
'supplemental' data is added when you successfully create a term. The two
types of 'supplemental' data
https://core.trac.wordpress.org/browser/tags/4.5.2/src/wp-admin/includes
/ajax-actions.php?marks=861,866#L819:
a. An array `array( 'noparents' => $noparents, 'parents' => $parents )`,
where `$noparents` and `$parents` are strings (markup for a row of the
list table).
b. A `WP_Term` object, cast to array.
It's not clear to me how either one of these would end up with a nested
array.
If you can provide more debugging info - in particular, the value of
'supplemental' that's causing the problem - it would be helpful. You can
get this info by looking at the response sent by the AJAX request, using
your browser's Network inspector.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/37028#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list