# 网站超过1000个类别的子类别视图问题

**URL:** <https://meta.discourse.org/t/subcategories-view-problem-for-site-larger-than-1-000-categories/353920>\
**Category:** Bug\
**Created:** [2025年二月23日 12:59 UTC](https://meta.discourse.org/t/subcategories-view-problem-for-site-larger-than-1-000-categories/353920 "2025-02-23T12:59:45Z")\
**Posts on this page:** 1\
**Showing post:** 6

<div class="post-metadata">

**Author:** ![nbianca](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nbianca/32/157984_2.png) [@nbianca](https://meta.discourse.org/u/nbianca)\
**Post date:** [2025年二月25日 18:40 UTC](https://meta.discourse.org/t/subcategories-view-problem-for-site-larger-than-1-000-categories/353920/6 "2025-02-25T18:40:11Z")

</div>

我已经修复了一个 Bug：

> <https://github.com/discourse/discourse/pull/31507>
>
> Commit f1700ca58929bcbfad23565861d1d3084ae1b3f8 ensures that categories are load…ed lazily, in pages, if the number of visible categories is over
> 1000. This affected the list of subcategories on the category page too.
> 
> The logic has been changed to only paginate if the number of categories that would have been returned is grater than 1000. For example, if there is a parent category filter, pagination will only be enforced if the number of subcategories is over 1000.

我们引入此功能是为了解决拥有超过 1000 个分类的站点，“/categories”页面无法使用的问题。但不幸的是，这引入了一个 Bug，即如果一个站点有超过 1000 个分类，它将尝试强制子分类也进行懒加载（或分页），即使并非如此。

---

_[View the full topic](https://meta.discourse.org/t/subcategories-view-problem-for-site-larger-than-1-000-categories/353920)._
