Discourse 데스크톱 사이트에서 "dt7948 is not defined" 오류 발생

이 문제가 이미 한동안 지속되고 있으며, 해결 방법을 찾지 못했습니다.

  1. 데스크톱 브라우저에서 우리의 (비공개) Discourse 웹사이트로 이동합니다.
  2. 흰색 화면이 표시됩니다.
  3. 콘솔을 확인하면 다음과 같은 오류가 나타납니다:
> Uncaught ReferenceError: dt7948 is not defined
>     at number-field.js:10:1
>     at <static_initializer> (number-field.js:10:1)
>     at 65553 (number-field.js:10:1)
>     at n (image-controls.js:109:1)
>     at 23387 (number-field.js:10:1)
>     at n (image-controls.js:109:1)
>     at 54732 (number-field.js:10:1)
>     at n (image-controls.js:109:1)
>     at s.callback (chunk.aa0584e1bdd0fed47ca6.d41d8cd9.js:1:401818)
>     at s.exports (loader.js:106:1)Understand this error
> jam-console-devtools.js:1 ℹ️ Discourse v3.4.0.beta1-dev — https://github.com/discourse/discourse/commits/335ab115b3 — Ember v5.5.0
> number-field.js:10 Uncaught (in promise) ReferenceError: Cannot access 'm' before initialization
>     at Module.default (number-field.js:10:1)
>     at c._extractDefaultExport (user-status-bubble.js:11:1)
>     at c.resolveOther (user-status-bubble.js:11:1)
>     at c.resolve (user-status-bubble.js:11:1)
>     at index.js:742:1
>     at f.resolve (index.js:523:1)
>     at f.resolve (index.js:525:1)
>     at o (index.js:237:1)
>     at i.factoryFor (index.js:184:1)
>     at u.factoryFor (container_proxy.js:32:1)
>     at index.js:4343:1
>     at index.js:4350:1
>     at sr.lookupComponent (index.js:4471:1)
>     at opcode-compiler.js:188:1
>     at ie (opcode-compiler.js:2032:1)
>     at u (opcode-compiler.js:1973:1)
>     at opcode-compiler.js:1638:1
>     at _.compile (opcode-compiler.js:410:1)
>     at re (opcode-compiler.js:1976:1)
>     at opcode-compiler.js:1955:1
>     at ee.compile (opcode-compiler.js:1938:1)
>     at Wt.compile (runtime.js:4796:1)
>     at Object.evaluate (runtime.js:1978:1)
>     at Object.evaluate (runtime.js:1052:1)
>     at It.evaluateSyscall (runtime.js:4204:1)
>     at It.evaluateInner (runtime.js:4175:1)
>     at It.evaluateOuter (runtime.js:4168:1)
>     at Wt.next (runtime.js:4999:1)
>     at Wt._execute (runtime.js:4986:1)
>     at Wt.execute (runtime.js:4979:1)
>     at Qt.sync (runtime.js:5046:1)
>     at hr.render (index.js:4672:1)
>     at index.js:4934:1
>     at Nt (runtime.js:4080:1)
>     at gr._renderRoots (index.js:4916:1)
>     at gr._renderRootsTransaction (index.js:4960:1)
>     at gr._renderRoot (index.js:4905:1)
>     at gr._appendDefinition (index.js:4830:1)
>     at gr.appendOutletView (index.js:4820:1)
>     at invoke (backburner.js.js:282:1)
>     at h.flush (backburner.js.js:197:1)
>     at p.flush (backburner.js.js:358:1)
>     at B._end (backburner.js.js:798:1)
>     at B._boundAutorunEnd (backburner.js.js:523:1)

dt7948에 대한 참조는 여기 있습니다: discourse/spec/lib/discourse_js_processor_spec.rb at 66a23180d4655c0d0312e0a6485b5dbad291952a · discourse/discourse · GitHub

다음 조치들을 취했지만 성공하지 못했습니다:

  1. containers/app.yml을 통해 모든 플러그인을 비활성화했습니다.
  2. Cloudflare 자동 미니피케이션을 확인했습니다 (수년 전부터 꺼져 있었습니다).
  3. 여러 번 전체 업데이트를 수행했습니다.

데스크톱에서 작동하는 유일한 방법은 Safe Mode로 웹사이트를 실행하는 것이며, 모바일에서는 정상적으로 작동합니다.

제 app.yml의 플러그인은 다음과 같습니다:

          - git clone https://github.com/discourse/docker_manager.git
          - git clone https://github.com/discourse/discourse-ai.git
##          - git clone https://github.com/procourse/procourse-memberships.git
          - git clone https://github.com/gdpelican/retort.git
##          - git clone https://github.com/discourse/discourse-chat-integration.git
##          - git clone https://github.com/discourse/discourse-solved.git
          - git clone https://github.com/discourse/discourse-subscriptions.git

이 문제를 어떻게 수정할 수 있을까요?

안전 모드가 정상적으로 작동한다면, 플러그인뿐 아니라 설치된 테마도 확인해 보시는 것이 좋습니다. (<site-url>/?safe_mode=no_themes).

테마가 문제를 일으키고 있지 않다는 것을 확인해 주실 수 있나요?

정말 좋은 팁이었어요!

네, 테마를 사용하고 있었고, /?safe_mode=no_themes를 추가하니 정상적으로 로딩되네요.

트러블슈팅에 정말 큰 도움이 되었는데, 이걸 놓쳤다는 게 스스로 한심할 지경이에요!

테마 코드를 직접 확인해 볼 수 없기 때문에 단정적으로 말하기는 어렵습니다. 하지만 테마에 <script> 태그가 있고, 이 태그가 require()를 통해 Discourse 코드를 로드하는 경우라면 이전에 비슷한 문제를 본 적이 있습니다.

<script type="text/discourse-plugin" version="0.8">으로 변경하면 로딩 시점이 약간 늦어지고, dt7948 문제가 발생하지 않아야 합니다.

저희 커스텀 테마가 5년 전의 Simple 테마를 기반으로 구축되어 있다는 더 근본적인 문제가 있다고 생각합니다.

전체 테마 업그레이드를 진행할 예정입니다.

@nat님과 @david님이 올바른 방향으로 이끌어주셔서 진심으로 감사드립니다.

진행 상황은 알려드리겠습니다.

최신 버전의 "Simple"을(를) 사용하여 테마를 재구축했습니다.

모든 것이 정상입니다.