User Notes plugin is breaking my site

I just updated two sites I maintain, and with both of them I ran into difficulties that led me to the user notes plugin.

On one of my sites yesterday, I got the “white screen of death” - the site was not visible at all except in safe mode. I commented out the plugin in app.yml and rebuilt, and the site came back.

On another, only the top nav with the logo and hamburger menu etc disappeared and I got an error in the console - see below. Disabling the plugin via the admin dashboard brought it back.

vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:12 Uncaught (in promise) Error: Could not find module `discourse/plugins/discourse-user-notes/discourse-user-notes/connectors/user-profile-controls/show-notes-on-profile` imported from `discourse/plugins/discourse-staff-notes/discourse-user-notes/connectors/admin-user-controls-after/add-user-notes-button`
    at vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:12:31
    at c (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:12:96)
    at s.findDeps (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:24:158)
    at c (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:12:152)
    at requireModule (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:6:60)
    at discourse-aebc0fdc441730b0e5f42bf52a5341cffca664e9a40a015a846b1b64f61dd773.js:4420:78
    at discourse-aebc0fdc441730b0e5f42bf52a5341cffca664e9a40a015a846b1b64f61dd773.js:4420:1
    at Array.forEach (<anonymous>)
    at a (discourse-aebc0fdc441730b0e5f42bf52a5341cffca664e9a40a015a846b1b64f61dd773.js:4417:32)
    at u (discourse-aebc0fdc441730b0e5f42bf52a5341cffca664e9a40a015a846b1b64f61dd773.js:4420:39)
    at discourse-aebc0fdc441730b0e5f42bf52a5341cffca664e9a40a015a846b1b64f61dd773.js:4424:261
    at discourse-aebc0fdc441730b0e5f42bf52a5341cffca664e9a40a015a846b1b64f61dd773.js:4420:1
    at Array.forEach (<anonymous>)
    at a (discourse-aebc0fdc441730b0e5f42bf52a5341cffca664e9a40a015a846b1b64f61dd773.js:4417:32)
    at c (discourse-aebc0fdc441730b0e5f42bf52a5341cffca664e9a40a015a846b1b64f61dd773.js:4424:64)
    at e.renderedConnectorsFor (discourse-aebc0fdc441730b0e5f42bf52a5341cffca664e9a40a015a846b1b64f61dd773.js:4414:65)
    at e.init (discourse-aebc0fdc441730b0e5f42bf52a5341cffca664e9a40a015a846b1b64f61dd773.js:1196:50)
    at e.r [as init] (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:2090:9)
    at g (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:2007:98)
    at e.create (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:2015:108)
    at g.create (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:604:93)
    at ye.create (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:747:9)
    at Object.evaluate (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3299:9)
    at Object.evaluate (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3134:13)
    at Dt.evaluateSyscall (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3435:61)
    at Dt.evaluateInner (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3429:138)
    at Dt.evaluateOuter (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3429:59)
    at Wt.next (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3490:26)
    at Wt._execute (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3489:25)
    at Wt.execute (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3488:298)
    at Yt.sync (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3492:86)
    at Er.render (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:1061:546)
    at vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:1087:31
    at It (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3425:5)
    at Rr._renderRoots (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:1086:34)
    at Rr._renderRootsTransaction (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:1091:10)
    at Rr._renderRoot (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:1085:50)
    at Rr._appendDefinition (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:1080:6)
    at Rr.appendOutletView (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:1078:6)
    at invoke (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3834:139)
    at p.flush (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3826:74)
    at h.flush (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3839:207)
    at q._end (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3896:9)
    at _boundAutorunEnd (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3848:605)
discourse-aebc0fdc441730b0e5f42bf52a5341cffca664e9a40a015a846b1b64f61dd773.js:5224 Uncaught (in promise) TypeError: Cannot read properties of null (reading 'addEventListener')
    at discourse-aebc0fdc441730b0e5f42bf52a5341cffca664e9a40a015a846b1b64f61dd773.js:5224:291
    at Array.forEach (<anonymous>)
    at e.didInsertElement (discourse-aebc0fdc441730b0e5f42bf52a5341cffca664e9a40a015a846b1b64f61dd773.js:5224:253)
    at e.r [as didInsertElement] (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:2090:9)
    at e.trigger (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:2233:34)
    at e.r [as trigger] (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:2090:9)
    at ye.didCreate (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:761:32)
    at Nt.commit (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3414:3)
    at Mt.commit (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3423:17)
    at It (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3425:19)
    at Rr._renderRoots (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:1086:34)
    at Rr._renderRootsTransaction (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:1091:10)
    at Rr._revalidate (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:1091:490)
    at invoke (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3834:129)
    at p.flush (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3826:74)
    at h.flush (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3839:207)
    at q._end (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3896:9)
    at _boundAutorunEnd (vendor-fded770671ed964514369b968313e4ab522dc911c142420bcc24ae31cf85252f.js:3848:605)
4 Likes

I thought it is installed on meta as well? Any repro here?

4 Likes

I’ll let you know what happens when I update my test site that has it…

EDIT: I made sure to add some user notes prior to the upgrade to see if that caused any issues, but I had none. Worked just fine.

4 Likes

I have that plugin on my test site (80fce67150) as well as here on Meta and everything seems to be working okay?

Actually, saying that, the ‘add user note’ button is only showing up in some usercards and not others.

I think it only shows for people who have had a user note attached at some point. Those who haven’t ever had one don’t seem to be generating it.

@tobiaseigen Did you use any user notes yet on either of those sites?

5 Likes

What a puzzle. I have disabled it now because it doesn’t work on my sites, so can’t check. On the site exhibiting white screen of death I had used it in the distant past but can’t recall on which users. On the site exhibiting missing header I never used it.

2 Likes

I was thinking that it could maybe be because there weren’t any, and it was having a hard time figuring something out because there was no precedent for it to follow:


`Uncaught (in promise) Error: Could not find module `discourse/plugins/discourse-user-notes/discourse-user-notes/connectors/user-profile-controls/show-notes-on-profile` imported from `discourse/plugins/discourse-staff-notes/discourse-user-notes/connectors/admin-user-controls-after/add-user-notes-button`
    

And, for the second,

Cannot read properties of null

I’m pretty sure the :memo: icon normally shows on everyone’s usercard, so something is a bit squiff even on here.

1 Like

hmm… the white screen of death site is showing this on a custom theme component’s settings. maybe a next step for me is to try disabling this theme component and then enabling user notes again.

Sorry – using ember or .ember-view CSS selectors is not permitted, because these names are dynamically generated at runtime and will change over time, eventually resulting in broken CSS. Try a different selector.

2 Likes

Unless I misunderstand your point…I don’t think this is correct. I’ve only ever seen the :memo: icon when a user note has been created for that specific user. I’ve never seen them applied to all users simply when the plugin is enabled.

3 Likes

The one next to the username on posts only shows when there’s a note. But I thought the one in the usercard was a way to add them easily.

Though I may be misremembering. :slightly_smiling_face:

2 Likes

Ah…yes I think we’re talking UI at two different places: On the user profile the button should always be present when the plugin is enabled, thusly:

But only appear next to their name in a topic if they have a user note:

And who uses “thusly” in a sentence? This guy.

2 Likes

My bad, I should’ve included a screenshot too. :slight_smile: I mean the :memo: one on the usercard:

It’s only showing up for some and not others, whereas I thought it used to show up on everyone’s.

2 Likes

Ah…we’re getting closer. :wink:

I’ve only ever seen it there when the user has an associated note. That’s what I’ve come to expect but I’d have to look at the code to see if that’s what’s intended.

3 Likes

Having this same issue since I rebuilt the docker image.

Getting this in Chrome’s dev console on home page of site over and over:

Uncaught (in promise) Error: Could not find module `discourse/plugins/discourse-user-notes/discourse-user-notes/connectors/user-profile-controls/show-notes-on-profile` imported from `discourse/plugins/discourse-staff-notes/discourse-user-notes/connectors/admin-user-controls-after/add-user-notes-button`
    at loader.js:247:1
    at c (loader.js:258:1)
    at s.findDeps (loader.js:168:1)
    at c (loader.js:262:1)
    at requireModule (loader.js:24:1)
    at plugin-connectors.js:65:1
    at plugin-connectors.js:51:1
    at Array.forEach (<anonymous>)
    at a (plugin-connectors.js:46:1)
    at u (plugin-connectors.js:64:1)
    at plugin-connectors.js:93:1
    at plugin-connectors.js:51:1
    at Array.forEach (<anonymous>)
    at a (plugin-connectors.js:46:1)
    at c (plugin-connectors.js:84:1)
    at e.renderedConnectorsFor (plugin-connectors.js:107:1)
    at e.init (plugin-outlet.js:53:1)
    at e.r [as init] (index.js:449:1)
    at g (core_object.js:149:1)
    at e.create (core_object.js:685:1)
    at g.create (index.js:551:1)
    at ye.create (index.js:1054:1)
    at Object.evaluate (runtime.js:3301:1)
    at Object.evaluate (runtime.js:1312:1)
    at Dt.evaluateSyscall (runtime.js:5232:1)
    at Dt.evaluateInner (runtime.js:5188:1)
    at Dt.evaluateOuter (runtime.js:5180:1)
    at Wt.next (runtime.js:6191:1)
    at Wt._execute (runtime.js:6175:1)
    at Wt.execute (runtime.js:6166:1)
    at Yt.sync (runtime.js:6250:1)
    at Er.render (index.js:7576:1)
    at index.js:7896:1
    at It (runtime.js:5074:1)
    at Rr._renderRoots (index.js:7876:1)
    at Rr._renderRootsTransaction (index.js:7928:1)
    at Rr._renderRoot (index.js:7863:1)
    at Rr._appendDefinition (index.js:7770:1)
    at Rr.appendOutletView (index.js:7752:1)
    at invoke (backburner.js:353:1)
    at p.flush (backburner.js:241:1)
    at h.flush (backburner.js:447:1)
    at B._end (backburner.js:999:1)
    at B._boundAutorunEnd (backburner.js:648:1)

disabling the plug in admin->plugins makes the error go away, but now there are no notes :frowning:

Is it possible because im running discourse-staff-notes and not discourse-user-notes?

2 Likes

AFAIK user notes is the newer name for staff notes, they’re the same thing. If you visit https://github.com/discourse/discourse-staff-notes you will be redirected to:

It certainty can’t hurt to correct the app.yml if it references the old path though.

3 Likes

FWIW We ran into the same error as Tobias today.

Same error, white screen on mobile, no top nav on desktop.
Happened on the home page (maybe on more pages, didn’t check).

Very long story :sleeping: short, the winning remark is here

Even though they link to the same repository, the plugin breaks when it is installed in a plugin directory that is not called discourse-user-notes.

So Tobias, I want to bet you’re old school and still called it discourse-staff-notes, right?

6 Likes

But of course! I set up this site in 2015 so quite old school. I just renamed it and am rebuilding now, so we’ll see what happens. Thanks for the tip!

4 Likes

I just renamed and rebuilt, enabled it and I’m up and running again!

Thanks @RGJ !

2015 for us too!

6 Likes

I guess turning is like updating. You just have to remember to do it.

image

5 Likes

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