"dt7948 is not defined" error on Discourse desktop site

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

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 is the only thing that works on desktop, it works fine on mobile.

Here are my app.yml plugins:

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

If safe mode 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?

3 Likes

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!

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.

1 Like

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.

2 Likes

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

All is well.

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