User profiles no longer showing up after latest update to to v1.9.0.beta2 +95


(Tobias Eigen) #1

I’m pretty sure this started with a discourse update to v1.9.0.beta2 +95 yesterday - take a look below at the screenshots and error notice from the javascript console. I notice there is no repro on meta.


_ember_jquery-16a09ec….js:28913 Error: expected an implementation for text
    at Object.o [as assert] (https://community.namati.org/assets/ember_jquery-16a09ec3affb6cc585f0cb71e2fbbcb788ec390641302900b1b3736a97bbaff9.js:7:7179)
    at e.compile (https://community.namati.org/assets/ember_jquery-16a09ec3affb6cc585f0cb71e2fbbcb788ec390641302900b1b3736a97bbaff9.js:5:29921)
    at C (https://community.namati.org/assets/ember_jquery-16a09ec3affb6cc585f0cb71e2fbbcb788ec390641302900b1b3736a97bbaff9.js:4:5093)
    at https://community.namati.org/assets/ember_jquery-16a09ec3affb6cc585f0cb71e2fbbcb788ec390641302900b1b3736a97bbaff9.js:5:19523
    at Array.forEach (native)
    at e.compile (https://community.namati.org/assets/ember_jquery-16a09ec3affb6cc585f0cb71e2fbbcb788ec390641302900b1b3736a97bbaff9.js:5:19496)
    at e.compile (https://community.namati.org/assets/ember_jquery-16a09ec3affb6cc585f0cb71e2fbbcb788ec390641302900b1b3736a97bbaff9.js:5:18727)
    at Object.g [as compileLayout] (https://community.namati.org/assets/ember_jquery-16a09ec3affb6cc585f0cb71e2fbbcb788ec390641302900b1b3736a97bbaff9.js:4:4342)
    at e.n.Cache.n [as func] (https://community.namati.org/assets/ember_jquery-16a09ec3affb6cc585f0cb71e2fbbcb788ec390641302900b1b3736a97bbaff9.js:9:18500)
    at e.get (https://community.namati.org/assets/ember_jquery-16a09ec3affb6cc585f0cb71e2fbbcb788ec390641302900b1b3736a97bbaff9.js:11:20122)

I also have errors like this but this is nothing new - it doesn’t seem to affect the operation of the site.

TypeError: Cannot read property 'prototype' of undefined
    at HTMLDocument.<anonymous> (https://community.namati.org/u/tobiaseigen:502:38)
    at l (https://community.namati.org/assets/ember_jquery-16a09ec3affb6cc585f0cb71e2fbbcb788ec390641302900b1b3736a97bbaff9.js:2:6364)
    at Object.fireWith [as resolveWith] (https://community.namati.org/assets/ember_jquery-16a09ec3affb6cc585f0cb71e2fbbcb788ec390641302900b1b3736a97bbaff9.js:2:7127)
    at Function.ready (https://community.namati.org/assets/ember_jquery-16a09ec3affb6cc585f0cb71e2fbbcb788ec390641302900b1b3736a97bbaff9.js:2:8944)
    at HTMLDocument.s (https://community.namati.org/assets/ember_jquery-16a09ec3affb6cc585f0cb71e2fbbcb788ec390641302900b1b3736a97bbaff9.js:1:1026)

Custom JS in head makes messages not work
(Matt Palmer) #2

Plugins, I’ll wager. Does using safe mode solve the problem?


(Tobias Eigen) #3

hmm… seems to have something to do with my theme. when I disable that but allow all plugins it works.


(Matt Palmer) #4

Oh, wow, a theme issue. That wasn’t where I thought that was going. Which theme is it? @Sam, any guidance on theme debugging?


(Tobias Eigen) #5

I looked into this some more and see that it’s a theme customization done for us by @LeoMcA that is no longer compatible with latest. It’s a customization of user profiles/user themes. Disabling it in all themes makes it all work as expected again.


(Sam Saffron) #6

I recommend you split your theme into components makes it much easier to disable sections


(Lars) #7

Sounds related to “my” bug!

I had some js that modified the user card and profile page - It worked again after I removed it. I’d like to put it back though :stuck_out_tongue:


(Jeff Atwood) #8

Yeah this is related to the Ember upgrade @eviltrout – looks like people had some kinds of JS customizations in their themes that broke when Ember was upgraded.


(Robin Ward) #9

Can you post the customization so I can reproduce the error?

Also @daath yours might be helpful too – I see the pastebin in the other topic has been removed.


(Tobias Eigen) #10

Here ya go. Go crazy, and thanks.

user-card-profile-customization-ember-2-10.dcstyle.json (7.2 KB)


(Robin Ward) #11

Your customization was using a private API in ember (lookupFactory).

To upgrade your customization, change your plugin API version to 0.8.7 and replace your api.container.lookupFactory to reopen the class with the new api.modifyClass instead:

api.container.modifyClass('component:user-card-contents', {
  hasLocationOrWebsite: true
});

(Lars) #12

Of course. Here it is: https://pastebin.com/V6FU7saz

Thanks :smiley:


(Rafael dos Santos Silva) #13

This uses the same private API, lookupFactory.


(Lars) #14

So, can we just replace it with api.container.modifyClass?

EDIT: Having some problems finding docs about modifyClass - And another question: Is there still no way to get the external_id?

EDIT2: And what exactly do you mean by change our plugin API version? Do we have to do this, or do we just change the code?

EDIT3: Sorry. You obviously meant <script type="text/discourse-plugin" version="0.2">

EDIT4: Well, it doesn’t produce any errors - My code also no longer works :stuck_out_tongue_winking_eye: I guess I’ll have to do some reading.


(Robin Ward) #15

Looks like you’re making progress but here is the example from the plugin-api interface.

Good luck debugging :slight_smile:


(Lars) #16

Thanks. Not making much progress though. Are there any examples that manipulate the user card or the profile page? The only examples I see from @techAPJ are using the api.container.modifyClass call…


(Arpit Jalan) #17

I updated the code here:


(Lars) #18

Thanks, @techAPJ! :smiley:

BTW: Just to be sure: external_id is still not exposed anywhere, right?


(Arpit Jalan) #19

You will have to create a new a custom user field and save external_id in that field to access it.