Opened 4 years ago

Closed 3 years ago

Last modified 3 years ago

#8613 closed defect (bug) (fixed)

Add category from editor produces some weirdness when adding subcategories?

Reported by: Denis-de-Bernardy Owned by:
Priority: low Milestone: 2.9
Component: Administration Version: 2.7
Severity: minor Keywords: needs-patch
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 4 years ago.
new post (subcategories look normal)
screen-capture-1.png (210.7 KB) - added by Denis-de-Bernardy 4 years ago.
test post (subcategories lie flat)
8613.diff (1.3 KB) - added by Denis-de-Bernardy 4 years ago.
8613.patch (931 bytes) - added by hakre 4 years ago.
Fix. Do not commit.

Download all attachments as: .zip

Change History (23)

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

new post (subcategories look normal)

test post (subcategories lie flat)

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

comment:3   suit4 years ago

also mentioned here #8632

  • 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.

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

patch needs a refresh

hakre4 years ago

Fix. Do not commit.

  • 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.

  • 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.

  • Keywords commit added

+1

  • Owner changed from anonymous to Denis-de-Bernardy
  • Status changed from new to accepted
  • Milestone changed from 2.8 to 2.9
  • Keywords needs-patch added; has-patch tested commit removed

broken patch

  • Owner Denis-de-Bernardy deleted
  • Status changed from accepted to assigned
  • Resolution set to fixed
  • Status changed from assigned to closed

This seems fixed in trunk and that code has changed.

cross-referencing: #10982

Note: See TracTickets for help on using tickets.