Discourse and Uncaught ReferenceError: ClipboardJS is not defined

Hello!

I’ve updated my Discourse setup and after that I can’t do anything on the portal - login/upload doesn’t work due to error

''Uncaught ReferenceError: ClipboardJS is not defined
at _application-6e63262467d59797ebbf810f9848ba62cea8d3af738fee5b4263d20a1cd9a415.js:23581
    at n._decorate_28 (_application-6e63262467d59797ebbf810f9848ba62cea8d3af738fee5b4263d20a1cd9a415.js:24854)
    at j (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:25655)
    at n.trigger [as _super] (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:40185)
    at n.trigger (_ember_jquery-........
..................................." 

but I use docker container within VM and how to I can fix that? Already tried to rebuild app, but it’s not working.

1 Like

Can you share either the complete backtrace or a link to the site?

1 Like

Sure

    _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:4069 Uncaught ReferenceError: ClipboardJS is not defined
    at w.fn.init.$.fn.clipboardButton (706936f75ebdd4cf668a63704f90541a9ec54855.js?__ws=answers.***.com:509)
    at 706936f75ebdd4cf668a63704f90541a9ec54855.js?__ws=answers.****.com:532
    at application-6e63262467d59797ebbf810f9848ba62cea8d3af738fee5b4263d20a1cd9a415.js:sourcemap:1
    at n._decorate_28 (application-6e63262467d59797ebbf810f9848ba62cea8d3af738fee5b4263d20a1cd9a415.js:sourcemap:1)
    at j (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:25655)
    at n.trigger [as _super] (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:40185)
    at n.trigger (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:46069)
    at n [as trigger] (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:43433)
    at t.o.didCreate (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:19021)
    at e.t.commit (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:62778)
$.fn.clipboardButton @ 706936f75ebdd4cf668a63704f90541a9ec54855.js?__ws=answers.***com:509
(anonymous) @ 706936f75ebdd4cf668a63704f90541a9ec54855.js?__ws=answers.****.com:532
(anonymous) @ application-6e63262467d59797ebbf810f9848ba62cea8d3af738fee5b4263d20a1cd9a415.js:sourcemap:1
(anonymous) @ application-6e63262467d59797ebbf810f9848ba62cea8d3af738fee5b4263d20a1cd9a415.js:sourcemap:1
j @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:25655
trigger @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:40185
trigger @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:46069
n @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:43433
o.didCreate @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:19021
t.commit @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:62778
n.commit @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:62873
o.commit @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:18069
t._renderRoots @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:19654
t._renderRootsTransaction @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:19684
t._renderRoot @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:19607
t._appendDefinition @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:19525
t.appendOutletView @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:19511
t.invoke @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:66552
t.flush @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:66442
t.flush @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:66646
n._end @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:67222
n.end @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:66908
n._run @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:67277
n._join @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:67251
n.join @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:66968
f @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:53760
(anonymous) @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:53864
l @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3776
c @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3844
setTimeout (async)
w.readyException @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:4068
(anonymous) @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:4088
l @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3776
c @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3844
setTimeout (async)
(anonymous) @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3882
u @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3510
fireWith @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3640
fire @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3648
u @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3510
fireWith @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3640
c @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3864
setTimeout (async)
(anonymous) @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3882
u @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3510
fireWith @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3640
fire @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3648
u @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3510
fireWith @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:3640
ready @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:4120
z @ _ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:4130

And when I try to open /admin

    admin:1 GET https://answers.****.com/admin 404
    admin:1 [Deprecation] ::-webkit-details-marker pseudo element selector is deprecated. Please use ::marker instead. See https://chromestatus.com/feature/6730096436051968 for more details.
    eecff76782708e9285b719d36ba154c46916c59e.js?__ws=answers.****.com:6 Uncaught ReferenceError: $ is not defined
        at eecff76782708e9285b719d36ba154c46916c59e.js?__ws=answers.****.com:6
    (anonymous) @ eecff76782708e9285b719d36ba154c46916c59e.js?__ws=answers.****.com:6
1 Like
_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:4069 Uncaught ReferenceError: ClipboardJS is not defined
    at w.fn.init.$.fn.clipboardButton (706936f75ebdd4cf668a63704f90541a9ec54855.js?__ws=answers****.com:509)
    at 706936f75ebdd4cf668a63704f90541a9ec54855.js?__ws=answers.***.com:532
    at _application-6e63262467d59797ebbf810f9848ba62cea8d3af738fee5b4263d20a1cd9a415.js:23581
    at n._decorate_28 (_application-6e63262467d59797ebbf810f9848ba62cea8d3af738fee5b4263d20a1cd9a415.js:24854)
    at j (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:25655)
    at n.trigger [as _super] (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:40185)
    at n.trigger (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:46069)
    at n [as trigger] (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:43433)
    at t.o.didCreate (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:19021)
    at e.t.commit (_ember_jquery-36a23101c869ab0dc53fc908de69adb785731593573d32bdeef416acc1076ef4.js:62778)

1 Like

Looks like the error comes from a custom theme component you have installed. Use How to use Discourse Safe Mode to bypass themes, and disable this theme on the admin panel.

4 Likes

Thanks, will try to do that .

2 Likes

Yeah, it’s probably this one COPY option for code blocks in Discourse

1 Like