# 롤업 후 게시 이벤트 위젯에 채팅 링크가 없습니다

**URL:** https://meta.discourse.org/t/chat-link-missing-in-post-event-widget-after-to-rollup/400691
**Category:** Bug
**Tags:** events, fixed
**Created:** [4월 15, 2026, 1:06오후 UTC](https://meta.discourse.org/t/chat-link-missing-in-post-event-widget-after-to-rollup/400691 "2026-04-15T13:06:31Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![klappradla](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/klappradla/32/531604_2.png) [@klappradla](https://meta.discourse.org/u/klappradla)
#### Post date: [4월 15, 2026, 1:06오후 UTC](https://meta.discourse.org/t/chat-link-missing-in-post-event-widget-after-to-rollup/400691/1 "2026-04-15T13:06:32Z")

</div>

안녕하세요 👋

`discourse-calendar` 플러그인의 채팅 기능에서 작은 버그를 발견했습니다. 게시물 이벤트 위젯에서 채팅 채널로 연결되는 💬 링크가 갑자기 사라진 것입니다.

이 문제는 Discourse 코어에서 빌드 시스템을 [Rollup](https://rollupjs.org/)으로 전환한 최근 변경 사항으로 인해 발생했을 가능성이 높습니다:

- [af3385baba](https://github.com/discourse/discourse/commit/af3385baba) — Rollup 컴파일러 도입 (기본적으로 비활성화)
- [74d532c559](https://github.com/discourse/discourse/commit/74d532c559) — Rollup 컴파일러를 기본값으로 활성화

저는 이 문제를 수정하고 PR을 제공할 수 있습니다 🧑‍💻 .

## 기대 동작

토픽에 이벤트를 추가하고 `Chat Integration`(“_이벤트 전용 채팅 채널 생성 및 관리_” 선택)를 활성화하면, 게시물 위젯에는 해당 이벤트와 연결된 채팅 채널로 가는 링크가 포함된 💬 아이콘이 표시됩니다:

 ![게시물 이벤트 위젯에서 채팅 링크가 포함된 스크린샷](https://global.discourse-cdn.com/meta/original/4X/5/7/7/5775a026cad15a72fbc6696210ada1ee57f023a9.png)

## 현재 동작

현재 `main` 브랜치에서는 게시물 이벤트 위젯의 해당 섹션이 아예 렌더링되지 않습니다:

 ![깨진 게시물 이벤트 위젯 스크린샷](https://global.discourse-cdn.com/meta/original/4X/8/4/d/84d47ac5d07cca7e1b5565a9e17a3f52b1ee7a5f.png)

## 수정/해결 방법

문제는 지연 평가(lazy) `optionalRequire` 헬퍼가 Rollup 환경에서 처음 의도한 대로 작동하지 않는 것 같습니다. 제 이해에 따르면, Rollup은 다른 모듈이 아직 등록되지 않은 시점에 `optionalRequire`를 너무 일찍 호출하여 항상 `false`를 반환합니다.

이 문제를 해결하는 방법은 `optionalRequire` 호출을 컴포넌트의 생성자로 이동시켜 실제로 지연 평가되도록 하는 것입니다.

모델 파일의 경우 다음과 같이 보일 것입니다:

```diff
diff --git a/plugins/discourse-calendar/assets/javascripts/discourse/models/discourse-post-event-event.js b/plugins/discourse-calendar/assets/javascripts/discourse/models/discourse-post-event-event.js
index 742cc35a84..f687b956aa 100644
--- a/plugins/discourse-calendar/assets/javascripts/discourse/models/discourse-post-event-event.js
+++ b/plugins/discourse-calendar/assets/javascripts/discourse/models/discourse-post-event-event.js
@@ -7,10 +7,6 @@ import User from "discourse/models/user";
 import DiscoursePostEventEventStats from "./discourse-post-event-event-stats";
 import DiscoursePostEventInvitee from "./discourse-post-event-invitee";
 
-const ChatChannel = optionalRequire(
- "discourse/plugins/chat/discourse/models/chat-channel"
-);
-
 const DEFAULT_REMINDER = {
   type: "notification",
   value: 15,
@@ -62,6 +58,8 @@ export default class DiscoursePostEventEvent {
   @tracked _reminders;
 
   constructor(args = {}) {
+ const ChatChannel = optionalRequire( "discourse/plugins/chat/discourse/models/chat-channel");
+
     this.id = args.id;
     this.rrule = args.rrule;
     this.name = args.name;

```

실제 링크를 렌더링하는 컴포넌트의 경우에도 마찬가지입니다:

```diff
diff --git a/plugins/discourse-calendar/assets/javascripts/discourse/components/discourse-post-event/chat-channel.gjs b/plugins/discourse-calendar/assets/javascripts/discourse/components/discourse-post-event/chat-channel.gjs
index f673ee8a9f..a988b341e6 100644
--- a/plugins/discourse-calendar/assets/javascripts/discourse/components/discourse-post-event/chat-channel.gjs
+++ b/plugins/discourse-calendar/assets/javascripts/discourse/components/discourse-post-event/chat-channel.gjs
@@ -1,24 +1,27 @@
+import Component from "@glimmer/component";
 import { LinkTo } from "@ember/routing";
 import { optionalRequire } from "discourse/lib/utilities";
 import { and } from "discourse/truth-helpers";
 
-const ChannelTitle = optionalRequire(
- "discourse/plugins/chat/discourse/components/channel-title"
-);
+export default class DiscoursePostEventChatChannel extends Component {
+ get channelTitle() {
+ return optionalRequire(
+ "discourse/plugins/chat/discourse/components/channel-title"
+ );
+ }
 
-const DiscoursePostEventChatChannel = <template>
- {{#if (and @event.channel ChannelTitle)}}
- <section class="event__section event-chat-channel">
- <span></span>
- <LinkTo
- @route="chat.channel"
- @models={{@event.channel.routeModels}}
- class="chat-channel-link"
- >
- <ChannelTitle @channel={{@event.channel}} />
- </LinkTo>
- </section>
- {{/if}}
-</template>;
-
-export default DiscoursePostEventChatChannel;
+ <template>
+ {{#if (and @event.channel this.channelTitle)}}
+ <section class="event__section event-chat-channel">
+ <span></span>
+ <LinkTo
+ @route="chat.channel"
+ @models={{@event.channel.routeModels}}
+ class="chat-channel-link"
+ >
+ <this.channelTitle @channel={{@event.channel}} />
+ </LinkTo>
+ </section>
+ {{/if}}
+ </template>
+}

```

_(참고: 클래스 컴포넌트로 변환해야 하므로 diff가 더 크게 보입니다)_

GitHub에서 수정 사항을 담은 PR을 제공하여 사람들이 테스트해 보고 의견을 제시할 수 있도록 하겠습니다.

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [4월 15, 2026, 1:15오후 UTC](https://meta.discourse.org/t/chat-link-missing-in-post-event-widget-after-to-rollup/400691/2 "2026-04-15T13:15:46Z")

</div>

@klappradla 감사합니다. 제안해 주신 수정안이 좋습니다. PR이 준비되면 링크를 올려주세요 🚀

---

<div class="post-metadata">

### Author: ![klappradla](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/klappradla/32/531604_2.png) [@klappradla](https://meta.discourse.org/u/klappradla)
#### Post date: [4월 15, 2026, 1:21오후 UTC](https://meta.discourse.org/t/chat-link-missing-in-post-event-widget-after-to-rollup/400691/3 "2026-04-15T13:21:08Z")

</div>

이거요 @david → [FIX: Restore chat link on post event widget - Pull Request #39287 - discourse/discourse - GitHub](https://github.com/discourse/discourse/pull/39287)

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [4월 16, 2026, 12:27오후 UTC](https://meta.discourse.org/t/chat-link-missing-in-post-event-widget-after-to-rollup/400691/4 "2026-04-16T12:27:07Z")

</div>

병합했습니다. @klappradla 감사합니다

---

<div class="post-metadata">

### Author: ![klappradla](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/klappradla/32/531604_2.png) [@klappradla](https://meta.discourse.org/u/klappradla)
#### Post date: [4월 16, 2026, 1:20오후 UTC](https://meta.discourse.org/t/chat-link-missing-in-post-event-widget-after-to-rollup/400691/5 "2026-04-16T13:20:36Z")

</div>

그렇게 빨리 처리해 주셔서 감사합니다 🙏

---

<div class="post-metadata">

### Author: ![david](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/david/32/157490_2.png) [@david](https://meta.discourse.org/u/david)
#### Post date: [4월 19, 2026, 1:20오후 UTC](https://meta.discourse.org/t/chat-link-missing-in-post-event-widget-after-to-rollup/400691/6 "2026-04-19T13:20:52Z")

</div>

이 주제는 마지막 답변 후 3일 자동으로 닫혔습니다. 더 이상 새로운 답변을 할 수 없습니다.
