[wp-trac] [WordPress Trac] #21106: Unable to add Taxonomies to custom post type taxonomies in 3.4.1
WordPress Trac
wp-trac at lists.automattic.com
Tue Sep 4 19:39:44 UTC 2012
#21106: Unable to add Taxonomies to custom post type taxonomies in 3.4.1
----------------------------+--------------------------
Reporter: lightmensendme | Owner: markjaquith
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: 3.4.2
Component: Taxonomy | Version: 3.4
Severity: major | Resolution:
Keywords: has-patch |
----------------------------+--------------------------
Comment (by azaozz):
Looked at this too. [http://core.trac.wordpress.org/browser/trunk/wp-
includes/js/wp-lists.js#L391 This part] of wp-lists.js is pretty bad.
1. The `process()` runs on load with no arg, then on adding elements with
the element as arg. This isn't needed if the events are delegated (i.e.
attached to $(document) so they will trigger when new elements are added
with ajax). Also, on load `$el = $(document)` so doing `$el.find(...)`
goes through the whole DOM.
For this to work it shouldn't use .find() and only attach the events to
$(document) on load. There's no need to run it on each ajax response. All
this can be seen in action on the Comments screen.
2. We hit a bug in jQuery. When a class name contains `:action` it cannot
be used as selector in jQuery even when the `:` is escaped (it won't
select any elements). This affects `process()` too.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21106#comment:23>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list