WordPress.org

Make WordPress Core

Opened 5 years ago

Closed 4 years ago

Last modified 4 years ago

#8613 closed defect (bug) (fixed)

Add category from editor produces some weirdness when adding subcategories?

Reported by: Denis-de-Bernardy Owned by:
Milestone: 2.9 Priority: low
Severity: minor Version: 2.7
Component: Administration Keywords: needs-patch
Focuses: Cc:

Description

While testing WP 2.7, I tried the Add Category link in the post editor. I had two cats in there (Blog, cat). Upon adding cat2, a subcategory of cat, I ended up with Blog listed twice.

Attachments (4)

screen-capture.png (203.0 KB) - added by Denis-de-Bernardy 5 years ago.
new post (subcategories look normal)
screen-capture-1.png (210.7 KB) - added by Denis-de-Bernardy 5 years ago.
test post (subcategories lie flat)
8613.diff (1.3 KB) - added by Denis-de-Bernardy 5 years ago.
8613.patch (931 bytes) - added by hakre 5 years ago.
Fix. Do not commit.

Download all attachments as: .zip

Change History (23)

comment:1 Denis-de-Bernardy5 years ago

some more weirdness on this one. apparently, some bug will make the subcategory list lie flat in some circumstances. attaching screenshots of new post and test post to show the error

Denis-de-Bernardy5 years ago

new post (subcategories look normal)

Denis-de-Bernardy5 years ago

test post (subcategories lie flat)

comment:2 Denis-de-Bernardy5 years ago

seems quickedit is affected by screen-capture-1.png too

comment:3 suit5 years ago

also mentioned here #8632

Denis-de-Bernardy5 years ago

comment:5 Denis-de-Bernardy5 years ago

  • Keywords has-patch tested dev-feedback added
  • Milestone changed from 2.7.2 to 2.8

attached patch will move checked categories if and only if they've no parents.

see also #3130, which describes what seems like the best approach.

comment:6 Denis-de-Bernardy5 years ago

  • Keywords dev-feedback removed

comment:7 Denis-de-Bernardy5 years ago

  • Keywords needs-patch added; has-patch tested removed

patch needs a refresh

hakre5 years ago

Fix. Do not commit.

comment:8 hakre5 years ago

  • complete mess in 2.8 trunk on current test.
  • function wp_category_checklist() is missing a propper docblock.
  • class Walker_Category_Checklist is missing propper description everywhere.
  • patch has been somehow transposed. that did not make no sense.

fix in patch: remove the functionality to put seleted categories on top. should give enough space to re-write the patch on current trunk.

comment:9 hakre5 years ago

  • Keywords has-patch tested added; needs-patch removed

fix seems to be ready to commit because Selected categories should always be at top has been closed as wontfix. see #3104. or you see #3130 (#7000 is dup) which is an assigned enhancement and set to 2.9.

so please patch the bogus functionality out of the trunk and close the ticket. #3130 should then lead the way then.

comment:10 Denis-de-Bernardy5 years ago

  • Keywords commit added

+1

comment:11 Denis-de-Bernardy5 years ago

  • Owner changed from anonymous to Denis-de-Bernardy
  • Status changed from new to accepted

comment:13 Denis-de-Bernardy5 years ago

  • Milestone changed from 2.8 to 2.9

comment:15 Denis-de-Bernardy5 years ago

  • Keywords needs-patch added; has-patch tested commit removed

broken patch

comment:17 Denis-de-Bernardy5 years ago

  • Owner Denis-de-Bernardy deleted
  • Status changed from accepted to assigned

comment:18 azaozz4 years ago

  • Resolution set to fixed
  • Status changed from assigned to closed

This seems fixed in trunk and that code has changed.

comment:19 Denis-de-Bernardy4 years ago

cross-referencing: #10982

Note: See TracTickets for help on using tickets.