# 모바일에서 '분류되지 않음'이 표시됩니다

**URL:** https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839
**Category:** Bug
**Created:** [4월 14, 2021, 5:30오후 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839 "2021-04-14T17:30:25Z")
**Posts on this page:** 15
**Page:** 1

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [4월 14, 2021, 5:30오후 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/1 "2021-04-14T17:30:25Z")

</div>

저희 사이트에서는 `allow uncategorized topics`가 비활성화되어 있는데, 로그아웃 상태(혹은 관리자 계정으로 로그인한) 사용자가 Android 모바일에서 uncategorized 카테고리를 보고 있습니다. 방금 재빌드(rebuild)를 수행했습니다. 테마 구성 요소로는 이 문제를 설명할 수 없으며, Safe-Mode에서도 문제가 계속되고 있습니다. 공식 플러그인만 설치되어 있습니다.

데스크톱에서는 문제가 보이지 않습니다.

`https://www.druidforum.org/`

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [4월 14, 2021, 11:36오후 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/2 "2021-04-14T23:36:17Z")

</div>

분류되지 않은 카테고리에서 모든 주제를 정리하셨나요?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [4월 15, 2021, 12:23오전 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/3 "2021-04-15T00:23:28Z")

</div>

그래요! 약관 관련 주제뿐이고 다른 주제는 없어요. 제가 파악한 대로 이미 적용된 스펙으로는 그게 어떻게 가능한지 도무지 이해가 안 돼요. 그리고 모바일만 해당되고 데스크톱은 아니에요.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [4월 19, 2021, 1:36오전 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/4 "2021-04-19T01:36:19Z")

</div>

@tshenry, 이 문제를 재현해 볼 수 있을까요? 모바일에서만 발생하는 것 같은데?

---

<div class="post-metadata">

### Author: ![tshenry](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tshenry/32/119495_2.png) [@tshenry](https://meta.discourse.org/u/tshenry)
#### Post date: [4월 19, 2021, 11:01오후 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/5 "2021-04-19T23:01:03Z")

</div>

About 토픽이 비활성화되면 미분류(Uncategorized)에 남아 있을 것으로 예상하지 않습니다. `allow uncategorized topics` 사이트 설정 설명의 경고 문구(강조 추가)는 다음과 같습니다:

> 경고: **어떤** 미분류 토픽이 있더라도, 이 설정을 끄기 전에 해당 토픽을 반드시 다른 카테고리로 이동해야 합니다.

About 토픽을 활성 카테고리로 이동해 보실 수 있을까요? 제 테스트 사이트에서는 그렇게 했더니 잘 작동했습니다.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [4월 19, 2021, 11:08오후 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/6 "2021-04-19T23:08:18Z")

</div>

아, 알겠습니다. 그걸로 해결되었습니다.

보통 about 토픽을 삭제하는 것은 금지되어 있어서 꽤 혼란스럽습니다(하지만 실제로는 카테고리가 아니라서 진정한 _about_ 토픽은 아닌 것 같습니다). 그래도 삭제했는데, 이제 Uncategorized 항목이 더 이상 표시되지 않습니다. 그리고 다른 방법으로는 찾을 수 없어서 결국 휴대폰으로 해야 했습니다.

Uncategorized는 카테고리가 아니기 때문에 매우 혼란스럽습니다. 기본적으로 비활성화되어 있어야 한다고 생각합니다.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [4월 20, 2021, 8:30오후 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/8 "2021-04-20T20:30:39Z")

</div>

아니요. 처음부터 세계의 모든 항목에 인위적인 동물, 식물, 광물 분류를 강요하는 것은 옳지 않다고 생각하기 때문입니다. 죄송합니다.

그 안에 있는 경고가 존재하는 이유는 명확합니다:

> 경고: **분류되지 않은** 주제가 하나라도 있다면, 이 기능을 끄기 전에 반드시 다시 분류해야 합니다.

그럼에도 불구하고, @zogstrip 이 동작을 모바일과 데스크톱 간에 일관되도록 정규화할 수 있을까요?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [4월 20, 2021, 8:43오후 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/9 "2021-04-20T20:43:59Z")

</div>

> [@codinghorror](#):
>
> 아니요. 모든 개별 사례에 대해 처음부터 인위적인 동물, 식물, 광물 분류를 강요하는 것은 지지하지 않기 때문입니다. 죄송합니다.

네, 그 논리는 이해하고 예전에는 동의했습니다. 하지만 **기본** 카테고리가 없는 카테고리보다 훨씬 더 합리적이라고 생각합니다. 다만, 아마도 🍺 를 함께 마실 기회가 생길 때를 제외하고는 다시 그런 제안을 하지 않겠습니다.

---

<div class="post-metadata">

### Author: ![zogstrip](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/zogstrip/32/512781_2.png) [@zogstrip](https://meta.discourse.org/u/zogstrip)
#### Post date: [4월 21, 2021, 9:14오전 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/10 "2021-04-21T09:14:18Z")

</div>

> [@codinghorror](#):
>
> 그렇다고 해도, @zogstrip 모바일과 데스크톱 간에 일관성을 유지할 수 있도록 이 동작을 표준화할 수 있을까요?

@nbianca 미분류 항목이 데스크톱에서는 표시되지 않았는데 모바일에서는 표시된 이유를 조사해야 하는 항목을 목록에 추가해 주실 수 있을까요?

---

<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: [4월 21, 2021, 7:13오후 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/11 "2021-04-21T19:13:21Z")

</div>

데스크톱에서는 카테고리와 주제를 각각 표시하지만, 모바일에서는 카테고리와 주제를 결합하여 표시합니다. 이 점을 고려할 때, 버그를 일으키는 것은 바로 이 줄입니다:

> <https://github.com/discourse/discourse/blob/main/app/models/category_list.rb#L147>

`c.displayable_topics.blank?`는 데스크톱에서 주제를 별도로 로드하기 때문에 `displayable_topics`가 항상 비어 있어 항상 true입니다. 모바일에서는 해당 카테고리에 실제로 주제가 없을 때만 true입니다.

여기에는 두 가지 해결책이 있습니다:

- ‘미분류 주제 허용’ 설정 값과 관계없이 주제가 하나라도 있으면 미분류를 표시합니다.

- '미분류 주제 허용’이 false인 경우, 주제가 있어도 미분류를 숨깁니다.

두 번째 해결책은 조건문의 두 번째 부분을 단순히 제거하면 되므로 구현이 더 쉽습니다.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [4월 21, 2021, 7:26오후 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/12 "2021-04-21T19:26:59Z")

</div>

미분류에 있는 주제들을 숨기는 것이 (이상하게도) 설정을 켰을 때 미분류를 숨기지 않는 것보다 덜 혼란스럽다고 생각합니다. 미분류를 끄면 그 모든 주제가 사라진 것을 바로 눈치챌 수 있지만, 미분류를 껐는데 아무런 변화가 없다면 시스템이 고장 난 것처럼 느껴질 테니까요.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [4월 21, 2021, 8:14오후 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/13 "2021-04-21T20:14:34Z")

</div>

> [@nbianca](#):
>
> 두 번째 해결책은 조건의 두 번째 부분만 단순히 제거하면 되므로 구현이 더 쉽습니다.

여기서 릴리스가 임박해 있고 너무 위험한 행동을 하고 싶지 않으므로 더 쉬운 쪽으로 가겠습니다.

---

<div class="post-metadata">

### Author: ![sam](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/sam/32/102149_2.png) [@sam](https://meta.discourse.org/u/sam)
#### Post date: [4월 22, 2021, 12:19오전 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/14 "2021-04-22T00:19:14Z")

</div>

여기서 내 의견은 "가능한 한 많은 특수한 미분류 코드를 제거하자"입니다. 그런 코드가 많을수록 상황이 더 혼란스러워집니다.

그래서 저는 다음을 지지합니다:

> ‘미분류 주제 허용’ 설정 값과 관계없이, 주제가 하나라도 있다면 미분류를 표시하자

단, 구현 과정에서 Discourse의 특수한 마법 코드를 삭제하고 엣지 케이스를 줄일 수 있다면요.

결국 Discourse에서 더 많은 코드를 삭제하는 해결책을 선택하는 것이 좋습니다.

---

<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: [4월 29, 2021, 12:33오후 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/16 "2021-04-29T12:33:15Z")

</div>

첫 번째 게시물에 있는 버그에 대한 수정안을 제출했습니다:

> <https://github.com/discourse/discourse/pull/12889>
>
> Uncategorized was sometimes visible even if allow\_uncategorized\_topics
> was fals…e. This was especially happening on mobile, if at least one
> topic was uncategorized.

첫 번째 솔루션을 선택한 이유는 Discourse에서 일부 코드를 삭제하는 방식이기 때문입니다. 다른 솔루션은 실제로 미분류(uncategorized) 카테고리에 최소한 하나의 주제(topic)가 있는지 여부를 판단하기 위해 코드를 추가했습니다.

또한 category.uncategorized?의 모든 사용처를 검토했는데, Uncategorized를 독특한 존재(unicorn)가 아닌 더 일반적인 카테고리로 만들 경우 불필요할 수 있는 몇 가지 장소를 발견했습니다:

> <https://github.com/discourse/discourse/blob/af6d0342b642feac3a5e359d13c854d2a80145b6/app/controllers/list_controller.rb#L372-L378>

> <https://github.com/discourse/discourse/blob/3e7f7fdde8dd4ad92a34352ec927b2cdfbf91416/app/serializers/basic_category_serializer.rb#L43-L57>

> <https://github.com/discourse/discourse/blob/eeaecd4fd2216f909e643554b0ee7f728944c2c4/app/models/category.rb#L898>

이 부분들은 다른 기능과 충돌하지 않으므로 변경 사항의 위험성이 낮지만, 여전히 쉬운 작업은 아닙니다.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [5월 3, 2021, 4:52오전 UTC](https://meta.discourse.org/t/uncategorized-showing-up-on-mobile/186839/17 "2021-05-03T04:52:06Z")

</div>


