# "dt7948 is not defined" error on Discourse desktop site

**URL:** <https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464>\
**Category:** Product Support\
**Created:** [August 6, 2024, 11:42pm 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

## AI-generated summary

Users reported a "dt7948 is not defined" error causing a white screen on the Discourse desktop site. [BaronGrivet](/t/-/320464/1) tried disabling plugins and updates without success, but found Safe Mode worked. [nat](/t/-/320464/2) suggested checking themes, leading [BaronGrivet](/t/-/320464/3) to confirm the issue was theme-related — using `/?safe_mode=no_themes` resolved it. [david](/t/-/320464/4) noted the problem may stem from `<script>` tags in themes loading Discourse code via `require()`, recommending switching to `<script type="text/discourse-plugin" version="0.8">`. [BaronGrivet](/t/-/320464/5) acknowledged their custom theme was outdated (based on Simple theme from 5 years ago) and committed to upgrading. After rebuilding the theme on the latest Simple theme version, the issue was resolved [BaronGrivet](/t/-/320464/6).

<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:** [August 6, 2024, 11:42pm UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464/1 "2024-08-06T23:42:34Z")

</div>

This has been going on for a while & I haven’t found a way to fix it.

1. Navigate to our (private) discourse website on a desktop browser.
2. A white screen is shown.
3. Look in the console & see the following errors:

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

```

There is a reference to dt7948 here: [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)

I have taken the following actions without success:

1. Disabled all plugins via `containers/app.yml`
2. Check Cloudflare auto-minification (it’s been turned off for years)
3. Multiple full updates.

Running the website in [Safe Mode](https://meta.discourse.org/t/53504?silent=true) is the only thing that works on desktop, it works fine on mobile.

Here are my app.yml plugins:

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

```

How can I fix this issue?

---

<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:** [August 7, 2024, 5:37am UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464/2 "2024-08-07T05:37:43Z")

</div>

If [safe mode](https://meta.discourse.org/t/53504?silent=true) is working fine you may want to check what themes you have installed too, not just plugins. (`<site-url>/?safe_mode=no_themes`).

Can you confirm it’s not a theme causing issues?

---

<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:** [August 7, 2024, 7:32pm UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464/3 "2024-08-07T19:32:33Z")

</div>

That was a great tip!

Yes, we had a theme & yes adding `/?safe_mode=no_themes` makes it load okay.

That’s a great help with troubleshooting & I’m kicking myself to have missed it!

---

<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:** [August 7, 2024, 8:13pm UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464/4 "2024-08-07T20:13:25Z")

</div>

It’s hard to say for sure without being able to see your theme code. But we have seen this before if you have `<script>` in your theme which is then loading Discourse code via `require()`.

If you change it to `<script type="text/discourse-plugin" version="0.8">`, then it will load slightly later, and should not have the `dt7948` problem.

---

<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:** [August 7, 2024, 9:04pm UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464/5 "2024-08-07T21:04:50Z")

</div>

I think there’s a broader issue of our custom theme being built on the Simple theme from five years ago.

We’re going to do a full theme upgrade.

I really appreciate @nat &@david pointing me in the right direction.

I’ll let you know how we go.

---

<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:** [August 11, 2024, 7:39pm UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464/6 "2024-08-11T19:39:44Z")

</div>

We rebuilt the theme using the latest version of “Simple”.

All is well.

---

<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:** [September 10, 2024, 7:39pm UTC](https://meta.discourse.org/t/dt7948-is-not-defined-error-on-discourse-desktop-site/320464/7 "2024-09-10T19:39:47Z")

</div>

Closed on September 10, 2024, 7:39pm UTC

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