Opened 20 months ago
Closed 20 months ago
#62567 closed defect (bug) (duplicate)
Unexpected actions on categories list update from edit post screen
| Reported by: | iviweb | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Editor | Version: | 6.7.1 |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | javascript |
Description
There is an issue when editing categories checklist on post edit screen.
When we are selecting category, some unrelated categories also marking as checked, and are save as post attached categories.
For example, we have a category with ID=22, and when we are selecting this one, all categories, matching with the pattern "#category-in-22*" are checking also, it mean, if we have categories with ids 222,223,224,2225... etc all these categories are selecting, which is not a correct behavior.
The issue is investigated and the reason of this bug is bad selector matching in wp-admin/post.js:657 where
$('input#in-' + taxonomy + '-' + id + ', input[id^="in-' + taxonomy + '-' + id + '-"]').prop('checked', c);
query second selector
input[id^="in-' + taxonomy + '-' + id + '-"]
causing this issue.
The issue is discovered for default "category" taxonomies list, but this will happen for any category.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
Duplicate of #62504.