User preferences/dashboard is blank for one user only

A really weird issue I’m having with only one of my several Discourse instances, and only one user so far. This makes me think it’s something unusual about that user, perhaps something that’s become misconfigured over time.

This instance is around 2.5 years old, and has been migrated quite recently from a Digital Ocean droplet to another VPS provider, the migration went seamlessly and was done via backup export/import.

I first noticed this issue happening before the migration, and it’s the same following the migration, suggesting there’s something about this user in the DB that is not quite right, maybe?

Here’s a screenshot. Nothing below the first line of the user profile is present. (It’s not just hidden, the HTML isn’t there at all)

In the console I get an Ember error, which might have something to do with it, although I really have no idea how to debug this any further.

_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:28913 Error: expected an implementation for text
    at Object.o [as assert] (_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:11322)
    at e.compile (_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:11025)
    at C (_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:11024)
    at _ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:11024
    at Array.forEach (<anonymous>)
    at e.compile (_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:11024)
    at e.compile (_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:10997)
    at Object.g [as compileLayout] (_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:10997)
    at e.func (_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:20969)
    at e.get (_ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914de99a5dd6afb3cd3.js:27683)

As far as I can tell there’s nothing much different between this user’s User object and other similar users for whom the problem doesn’t happen.

Any ideas gratefully received.

Any difference if you access the profile in anyonymous / incognito mode?

Are you on latest Discourse 2.0 beta?

I suppose it is possible there is something strange in the About Me for this user, but hard to say.

1 Like

No, just tested it, exactly the same

Yes, I’m on v2.0.0.beta2 +47

Is there a way I could start to explore this? What would be the most likely culprit fields?

I’ve had a look at the User object in Rails console, and that user doesn’t appear to have anything obviously missing or added in the fields, however there are lots of other data-containing objects associated with a user, in which the problem could lie.

Looking at the SideKiq logs, there is one error that has come up a couple of times, which seems to have some connection with the error I have in the browser console:

Error: Could not find module pretty-text/censored-words imported from discourse/models/topic Url: https://www.openhealthhub.org/assets/ember_jquery-a8dcbd325e04410f036f2a791d66d8316c48c5387acdd914

2 Likes

Do you have a busted third party plugin installed? Try in safe mode.

1 Like

I didn’t know about /safe-mode - how useful!

In safe mode the error goes away.

These are the plugins I’m using, as far as I know they are all defaults apart from discourse-solved? In my containers/app.yml there are only two plugin lines: docker_manager and discourse_solved

1 Like

OK I have solved it I think.

By selectively disabling different features via safe-mode I worked out it was caused by something smartass in my theme.

It was caused by some custom code in the </head> section of my site customisations, which I had completely forgotten I had put in there. (It was meant to take a user’s @twitterhandle and automagically turn it into a clickable link. I got the code from somewhere on Meta although I can’t find it now.)

So the lesson of the day is: Don’t forget what custom weird code you have put in your site customisations.
Or even better: Don’t put custom weird code in your site customisations.

Thanks for your help @codinghorror

6 Likes