# 업그레이드 후 커스텀 테마에서 색상 팔레트가 작동하지 않음

**URL:** <https://meta.discourse.org/t/color-palette-not-working-for-custom-theme-after-upgrade/351106>\
**Category:** Support\
**Created:** [2월 7, 2025, 4:46오후 UTC](https://meta.discourse.org/t/color-palette-not-working-for-custom-theme-after-upgrade/351106 "2025-02-07T16:46:01Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![37Rb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/37rb/32/224158_2.png) [@37Rb](https://meta.discourse.org/u/37Rb)\
**Post date:** [2월 7, 2025, 4:46오후 UTC](https://meta.discourse.org/t/color-palette-not-working-for-custom-theme-after-upgrade/351106/1 "2025-02-07T16:46:01Z")

</div>

3.4.0으로 업그레이드한 후, 선택한 색상 팔레트에 대한 색상 정의가 더 이상 테마에 적용되지 않습니다. 색상 정의가 포함되어야 할 CSS 파일은 보이지만, 테마가 활성화되어 있을 때 해당 파일이 비어 있는 상태로 반환됩니다.

 ![Screenshot 2025-02-07 at 9.52.35 AM](https://global.discourse-cdn.com/meta/original/4X/1/3/c/13c81ff613cdd564a293467ecd7f1a58c27d5b93.png)

따라서 색상이 설정되지 않아 모든 팝업 창의 배경색이 투명해지고 사이트 사용이 불가능한 상태가 되었습니다. 임시 조치로 기본 Light 테마를 사용하도록 변경해 두었습니다.

생각할 수 있는 모든 방법을 시도해 보았습니다. 예를 들어:

- 색상 팔레트를 수동으로 생성
- 테마를 삭제한 후 다시 설치
- 라이브 포럼과 스테이징 포럼에서 다양한 시도와 오류 확인

저희 테마는 git 저장소에서 설치되었습니다. 테마의 이전 개발 복사본(git 저장소가 아닌 것)을 복원하여 잠시 동안 포럼의 외관을 정상으로 유지할 수 있었지만, 다음에 Discourse를 재시작했을 때 다시 문제가 발생했습니다.

스테이징 포럼에서는 테마를 삭제하고 다시 설치하니 문제가 해결되는 것 같았습니다. 하지만 라이브 포럼에서는 삭제 후 재설정이 효과가 없었습니다.

Light나 Dark와 같은 기본 테마로 전환하면 색상 팔레트가 정상적으로 작동하며, 해당 CSS 파일에 정의된 모든 색상을 확인할 수 있습니다.

저희 테마의 색상 정의가 비어 있는 상태로 반환되는 원인은 무엇일까요? 수정 방법에 대한 아이디어가 있을까요?

---

<div class="post-metadata">

**Author:** ![37Rb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/37rb/32/224158_2.png) [@37Rb](https://meta.discourse.org/u/37Rb)\
**Post date:** [2월 7, 2025, 9:20오후 UTC](https://meta.discourse.org/t/color-palette-not-working-for-custom-theme-after-upgrade/351106/2 "2025-02-07T21:20:57Z")

</div>

이것이 문제의 잠재적 원인인 것 같습니다. 저희 테마에는 ‘회사 소개’ 페이지의 콘텐츠를 저장하는 설정이 있습니다. Discourse 3.4.0으로 업데이트하기 전에 SCSS 컴파일 오류가 발생했던 기억이 없습니다. sass 컴파일링 방식이 변경되어 이제 더 엄격해진 것일까요?

 ![Screenshot 2025-02-07 at 3.12.10 PM](https://global.discourse-cdn.com/meta/original/4X/0/6/6/066e3a5a9ba385f16d94213e6979b8122bef52ff.png)

하지만 문제는 Discourse가 시작될 때 발생하는 것 같습니다. 해당 테마 설정에서 콘텐츠를 편집할 때만은 SCSS 오류가 기록되지 않습니다. Discourse를 재시작하면 SCSS 오류가 발생하고 색상 정의 CSS 파일이 다시 비어 있게 됩니다.

아래는 해당 설정을 사용하는 테마의 hbs 파일에 있는 코드입니다. 설정에 있는 콘텐츠는 단순히 HTML입니다.

```html
<div class="about-description-content">
	{{{theme-setting 'content_about_main'}}}
</div>

```

---

<div class="post-metadata">

**Author:** ![37Rb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/37rb/32/224158_2.png) [@37Rb](https://meta.discourse.org/u/37Rb)\
**Post date:** [2월 7, 2025, 10:44오후 UTC](https://meta.discourse.org/t/color-palette-not-working-for-custom-theme-after-upgrade/351106/3 "2025-02-07T22:44:58Z")

</div>

테마 설정에서 HTML을 hbs 파일로 직접 옮겼더니 문제가 해결된 것 같습니다. 이유는 모르겠지만 Discourse 3.4.0은 테마 설정에 HTML을 넣는 것을 허용하지 않는 것 같습니다.

---

<div class="post-metadata">

**Author:** ![manuel](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/manuel/32/468169_2.png) [@manuel](https://meta.discourse.org/u/manuel)\
**Post date:** [2월 8, 2025, 3:18오전 UTC](https://meta.discourse.org/t/color-palette-not-working-for-custom-theme-after-upgrade/351106/4 "2025-02-08T03:18:26Z")

</div>

여기에 헬퍼를 추가해야 할 것 같습니다:

```plaintext
{{html-safe (theme-setting 'content_about_main')}}

```

---

<div class="post-metadata">

**Author:** ![37Rb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/37rb/32/224158_2.png) [@37Rb](https://meta.discourse.org/u/37Rb)\
**Post date:** [2월 10, 2025, 5:09오후 UTC](https://meta.discourse.org/t/color-palette-not-working-for-custom-theme-after-upgrade/351106/5 "2025-02-10T17:09:28Z")

</div>

그렇게 들리면 그럴 가능성이 높아 보입니다. 그 html-safe 헬퍼에 대한 문서가 어딘가에 있을까요? 어떤 동작을 하는지 확인하고 싶습니다. 구글링을 해 봤지만 찾을 수 없네요.

---

<div class="post-metadata">

**Author:** ![RGJ](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/rgj/32/523185_2.png) [@RGJ](https://meta.discourse.org/u/RGJ)\
**Post date:** [2월 10, 2025, 5:12오후 UTC](https://meta.discourse.org/t/color-palette-not-working-for-custom-theme-after-upgrade/351106/6 "2025-02-10T17:12:15Z")

</div>

여기 있습니다 [https://api.emberjs.com/ember/5.12/functions/@ember%2Ftemplate/htmlSafe](https://api.emberjs.com/ember/5.12/functions/@ember%2Ftemplate/htmlSafe)

---

<div class="post-metadata">

**Author:** ![37Rb](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/37rb/32/224158_2.png) [@37Rb](https://meta.discourse.org/u/37Rb)\
**Post date:** [2월 10, 2025, 7:54오후 UTC](https://meta.discourse.org/t/color-palette-not-working-for-custom-theme-after-upgrade/351106/7 "2025-02-10T19:54:10Z")

</div>

아, 감사합니다. 에임버(Ember) 대신 핸들바(Handlebars) 문서를 검색하고 있었네요.

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)\
**Post date:** [3월 12, 2025, 7:54오후 UTC](https://meta.discourse.org/t/color-palette-not-working-for-custom-theme-after-upgrade/351106/8 "2025-03-12T19:54:42Z")

</div>

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.
