Make WordPress Core

Opened 8 months ago

Closed 8 months ago

Last modified 8 months ago

#61662 closed defect (bug) (fixed)

Classic Editor Category metabox shows all categories, without scrolling

Reported by: neotrope's profile neotrope Owned by: hellofromtonya's profile hellofromTonya
Milestone: 6.6.1 Priority: normal
Severity: normal Version: 6.6
Component: Editor Keywords: has-patch dev-reviewed commit fixed-major
Focuses: css Cc:

Description (last modified by sabernhardt)

Hi

With the latest 6.6 update today, in our post editor I'm now seeing the category box on right showing "all" categories in one major tall window vs set size with scroll. For news portal with couple hundred categories (e.g., STATE --> City), really long browser scroll. I have tried obvious hard reset in Chrome thinking a JavaScript update.

Seeing this error in console

Uncaught TypeError: Cannot read properties of undefined (reading 'isSavingMetaBoxes')
    at post.php?post=119772&action=edit:6420:69
    at HTMLDocument.<anonymous> (post.php?post=119772&action=edit:6604:7)
    at e (jquery.min.js:2:27028)
    at t (jquery.min.js:2:27330)

Attachments (2)

61662.diff (420 bytes) - added by joedolson 8 months ago.
61662.resize-menus-only.diff (1.7 KB) - added by sabernhardt 8 months ago.
alternative option: undo changes to edit.css and move those to nav-menus.css with #menu-settings-column scope

Download all attachments as: .zip

Change History (23)

#1 @sabernhardt
8 months ago

  • Component changed from General to Editor
  • Description modified (diff)

#2 @kaklase01
8 months ago

  • Resolution set to worksforme
  • Status changed from new to closed

try to edit your css regarding category tab, bring back its height to 200px in wp-admin/edit.css/

This fix mine.

#3 @neotrope
8 months ago

  • Resolution worksforme deleted
  • Status changed from closed to reopened

I used the Admin CSS MU plugin to quickly add this CSS:

div#categorydiv.postbox {
	height: 600px;
}

div#category-all.tabs-panel {
	height: 480px;
}

#4 @neotrope
8 months ago

Note we have this bug across multiple/all sites, multiple themes, php 7.4x and 8.2x.
No issues anywhere with 6.5.5; issue on all sites with 6.6 and Classic Widgets and Classic Editor active.

#5 @sabernhardt
8 months ago

  • Focuses css added
  • Keywords needs-patch added
  • Milestone changed from Awaiting Review to 6.6.1
  • Summary changed from Category Window Shows ALL cats, no scroll to Classic Editor Category metabox shows all categories, without scrolling

Hi and thanks for the report!

Changes in [58256] for the Menus page affected the Classic Editor metabox too.

#6 @sabernhardt
8 months ago

#61671 was marked as a duplicate.

@joedolson
8 months ago

#7 @joedolson
8 months ago

  • Keywords has-patch added; needs-patch removed
  • Owner set to joedolson
  • Status changed from reopened to accepted

#8 @joedolson
8 months ago

Missed because I didn't have enough terms in any taxonomy on my local dev environment to have a perceivable problem.

#9 @neotrope
8 months ago

We have news portals with a lot of categories and sub-cats like entertainment - books, entertainment - music, and then for all US states, have cities, like California - Los Angeles, California - San Diego (etc.) -- was super notable for us :)

@sabernhardt
8 months ago

alternative option: undo changes to edit.css and move those to nav-menus.css with #menu-settings-column scope

#10 @sabernhardt
8 months ago

61662.diff can solve the issue of excessively tall metaboxes for Categories and custom hierarchical taxonomies in the Classic Editor. However, it should use max-height instead of height for when the taxonomies have very few items.

I'm nervous about what other boxes we might have missed, so I made another option that restores edit.css and scopes the new resizing styles to affect only the #menu-settings-column. I had wanted to add those styles to nav-menus.css without the scope, but apparently the Classic Editor page loads that stylesheet too.

I am not sure which direction is more appropriate, especially in the context of a minor release.

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


8 months ago

#12 @joedolson
8 months ago

  • Keywords commit added

Discussed in dev chat and narrowing the scope to ensure that there's no bleed to other areas of the admin seems like the safest approach. It means that if this had any unexpected *positive* impacts anywhere, we'll lose those, but...honestly, I have trouble associating "unexpected" and "positive" here.

Marking for commit, using @sabernhardt's menus only diff.

#13 @joedolson
8 months ago

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

In 58747:

Editor: Limit scope of resizable menu container CSS.

The CSS to make menu item containers resizable in the admin menu editor was too broadly scoped, and caused classic editor metaboxes to have unconstrained height. Limit the scope of the CSS changes to only impact menu item containers.

Props neotrope, sabernhardt, joedolson.
Fixes #61662.

#14 @joedolson
8 months ago

  • Keywords dev-feedback added; commit removed
  • Resolution fixed deleted
  • Status changed from closed to reopened

Reopening for backport to 6.6.1.

#15 @jorbin
8 months ago

  • Keywords dev-reviewed added; dev-feedback removed

[58747] Looks good for backport to 6.6 branch

#16 @hellofromTonya
8 months ago

  • Keywords commit added
  • Owner changed from joedolson to hellofromTonya
  • Status changed from reopened to reviewing

[58747] LGTM for backport to the 6.6 branch.

Prepping the backport now.

#17 @hellofromTonya
8 months ago

Whoops, refresh Tonya before commenting :facepalm:

#18 @hellofromTonya
8 months ago

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

In 58758:

Editor: Limit scope of resizable menu container CSS.

The CSS to make menu item containers resizable in the admin menu editor was too broadly scoped, and caused classic editor metaboxes to have unconstrained height. Limit the scope of the CSS changes to only impact menu item containers.

Reviewed by jorbin.
Merges [58747] to the 6.6 branch.

Props neotrope, sabernhardt, joedolson.
Fixes #61662.

This ticket was mentioned in Slack in #core by hellofromtonya. View the logs.


8 months ago

#20 @hellofromTonya
8 months ago

  • Keywords fixed-major added

#21 @neotrope
8 months ago

Thank you! This resolved the 1200 line category box :)

Note: See TracTickets for help on using tickets.