#62625 closed defect (bug) (duplicate)
Checkboxes under the popular-category class in the category checklist behave unexpectedly.
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | major | Version: | 6.7.1 |
Component: | Taxonomy | Keywords: | |
Focuses: | Cc: |
Description
Selecting or interacting with certain categories inadvertently checks or unchecks unrelated checkboxes within the hierarchy. For examle the category has the id 25 and every category that includes number 25 will be trigger, like 258, 250, 251 etc.
The problem exist even i have disable all plugins and by using theme Twenty Twenty-Five.
The problem is reproducible in multiple browsers (e.g., Chrome, Firefox).
Steps to Reproduce
- Create a category item and check it's id - example "1", ensure that it will have the class "popular-category."
- Create another category (or subcategory) that will have id that starts with number 1, like 13
- Attempt to select the category with id 1 when creating a new post, you will see that category with id 13 will be also checked.
The issue appears to stem from this part of the script post.min.js
and this part of code:
h("#" + a + "checklist, #" + a + "checklist-pop").on("click", 'li.popular-category > label input[type="checkbox"]', function() { var t = h(this), e = t.is(":checked"), i = t.val(); i && t.parents("#taxonomy-" + a).length && (h('input[id^="in-' + a + "-" + i + '"]').prop("checked", e), h("input#in-popular-" + a + "-" + i).prop("checked", e)) });
Change History (3)
#2
@
4 months ago
- Keywords close added
- Resolution set to invalid
- Status changed from new to closed
Duplicate of https://core.trac.wordpress.org/ticket/62504
Note: See
TracTickets for help on using
tickets.
Screenshots
https://prnt.sc/P4kBJFXsYUIk
https://prnt.sc/xkviLxXuMLPP
https://prnt.sc/xkviLxXuMLPP
https://prnt.sc/Rfczrb_I-dra
https://prnt.sc/W_NqVZkr9AL8