# Ошибка «dt7948 is not defined» на десктопном сайте Discourse

**URL:** https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464
**Category:** Support
**Created:** [06.Август.2024 23:42:34 UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464 "2024-08-06T23:42:34Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![BaronGrivet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barongrivet/32/152142_2.png) [@BaronGrivet](https://meta.discourse.org/u/BaronGrivet)
#### Post date: [06.Август.2024 23:42:34 UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464/1 "2024-08-06T23:42:34Z")

</div>

Это продолжается уже какое-то время, и я не могу найти способ исправить это.

1. Откройте наш (частный) сайт Discourse в браузере на компьютере.
2. Появляется белый экран.
3. Проверьте консоль и увидите следующие ошибки:

```plaintext
> 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) Понять эту ошибку
> 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](https://github.com/discourse/discourse/blob/66a23180d4655c0d0312e0a6485b5dbad291952a/spec/lib/discourse_js_processor_spec.rb#L95)

Я предпринял следующие действия, но без успеха:

1. Отключил все плагины через `containers/app.yml`.
2. Проверил автоматическую минификацию Cloudflare (она отключена уже несколько лет).
3. Выполнил несколько полных обновлений.

Запуск сайта в безопасном режиме — единственное, что работает на компьютере; на мобильном устройстве всё работает нормально.

Вот мои плагины из app.yml:

```plaintext
          - 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

```

Как я могу исправить эту проблему?

---

<div class="post-metadata">

### Author: ![nat](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/nat/32/235063_2.png) [@nat](https://meta.discourse.org/u/nat)
#### Post date: [07.Август.2024 05:37:43 UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464/2 "2024-08-07T05:37:43Z")

</div>

Если безопасный режим работает корректно, проверьте также установленные темы, а не только плагины. (`<site-url>/?safe_mode=no_themes`).

Можете ли вы подтвердить, что проблема не в теме?

---

<div class="post-metadata">

### Author: ![BaronGrivet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barongrivet/32/152142_2.png) [@BaronGrivet](https://meta.discourse.org/u/BaronGrivet)
#### Post date: [07.Август.2024 19:32:33 UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464/3 "2024-08-07T19:32:33Z")

</div>

Отличный совет!

Да, у нас была тема, и да, добавление `/?safe_mode=no_themes` позволяет ей загружаться корректно.

Это очень помогло в поиске и устранении неполадок, и я себя ругаю за то, что упустил это!

---

<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: [07.Август.2024 20:13:25 UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464/4 "2024-08-07T20:13:25Z")

</div>

Точно сказать сложно, не видя код вашей темы. Однако мы уже сталкивались с подобным, если в вашей теме используется тег `<script>`, который затем загружает код Discourse через `require()`.

Если вы измените его на `<script type="text/discourse-plugin" version="0.8">`, то загрузка произойдёт немного позже, и проблема с `dt7948` должна исчезнуть.

---

<div class="post-metadata">

### Author: ![BaronGrivet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barongrivet/32/152142_2.png) [@BaronGrivet](https://meta.discourse.org/u/BaronGrivet)
#### Post date: [07.Август.2024 21:04:50 UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464/5 "2024-08-07T21:04:50Z")

</div>

Я думаю, что проблема шире: наш кастомный шаблон создан на основе Simple-тема пятилетней давности.

Мы планируем полную модернизацию шаблона.

Огромная благодарность @nat и @david за то, что указали мне верное направление.

Сообщу, как продвинутся дела.

---

<div class="post-metadata">

### Author: ![BaronGrivet](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/barongrivet/32/152142_2.png) [@BaronGrivet](https://meta.discourse.org/u/BaronGrivet)
#### Post date: [11.Август.2024 19:39:44 UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464/6 "2024-08-11T19:39:44Z")

</div>

Мы переделали тему, используя последнюю версию «Simple».

Всё в порядке.

---

<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: [10.Сентябрь.2024 19:39:47 UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464/7 "2024-09-10T19:39:47Z")

</div>

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