For various reasons - the two that come to mind are use of Layout Builder Restrictions, and "created the category but haven't gotten around to populating it yet" - categories might not have items in them. In those cases, you currently get an empty collapsible section, and I would propose that the section not appear at all.

A patch is incoming.

CommentFileSizeAuthor
#2 remove_empty_categories-3160404-2.patch1.42 KBkpaxman

Comments

kpaxman created an issue. See original summary.

kpaxman’s picture

Status: Active » Needs review
StatusFileSize
new1.42 KB

I feel like there might be a more optimized way of doing this, but this seems to work, tested against my two use cases.

  • StryKaizer committed 0e1ed3b on 8.x-1.x authored by kpaxman
    Issue #3160404 by kpaxman: Don't show categories without items
    
strykaizer’s picture

Status: Needs review » Fixed

Thanks Kevin!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.