Error when trying to view an email from a user's preference page

I’ve recently updated one of the forums I’m working on. 944c0db

I’m bouncing back and forth between Admin and User’s preference page trying to fill in some full names. Viewing someone’s email will tell me who they are, but if I do it from the user’s profile page I get this error, which is logged:

Uncaught TypeError: undefined is not a function
Url: [FQDN]/assets/application-ea98de13baf37557a958317a1bc29054.js
Line: 34
Column: 69
Window Location: [FQDN]/users/[any-user]/preferences?undefined-renamed=&undefined-renamed=&undefined-renamed=&undefined-renamed=

There is no problem viewing their email address from the admin page, but I can’t fix their Full Name there. :grumpycat:

I can view emails from the user’s profile page fine by clicking “show email”, is there a specific set of repro steps here?

Nothing special, just clicking the Show Email button of a user, when logged in as an admin.

You already have access to the forum in question, I’ll PM you a link to the log itself.

Update

I’ve upgraded to what’s currently master, and can reproduce the issue Safari and Chrome.

If I visit any user’s /users/garret/preferences view as an admin, clicking Show gives this error.

Also, the full name wasn’t included in emails today ( in the same email where I said they should. :frowning: )

OK confirmed, from the admin page clicking or tapping the show email button indeed causes an error. Can you fix tomorrow @eviltrout?

Hmm this one is tricky, I think it depends where you came from. Sometimes I can repro, sometimes I cannot. Can you walk us through it, click by click?

Start from a new browser and the home page.

  • click on home logo
  • go to admin/users
  • click on a user from the list (admin/users/mike)
  • click show
  • fix their title
  • click Show Public Profile
  • click Preferences
  • click show on email <- error
  • fix their full name

Same thing when starting from the list of posts

  • Click the home logo
  • scroll down to someone’s icon who’s posted lately
  • click their logo to get their activity page
  • click Preferences
  • Click Show on email <- error
2 Likes
  • No repro on the first list of steps, oddly, when I get to the user page I have email already visible…

  • Second list of steps is a repro for me. Page just refreshes when I click “show” on email in that case.

1 Like

I assumed this was normal behavior when I’d already asked to view their email in the same session… choosing a different user let me have the “need to click to show” experience.

1 Like

Window Location: [FQDN]/users/[any-user]/preferences?undefined-renamed=&undefined-renamed=&undefined-renamed=&undefined-renamed=

I had a similar error last week when I refactored a <button> to a {{d-button}} in the user’s preference template. Here’s what I did to fix it:

https://github.com/discourse/discourse/blob/11bf7da63cbbd5ebcb0066f2774577cabf806550/app/assets/javascripts/discourse/components/d-button.js.es6#L35

Here’s a fix for this:

https://github.com/discourse/discourse/commit/0c6faca7f432576809e3a4f5196a9d399fc981da

5 Likes

I wonder where the undefined-renamed query parameters are coming from?

Me too. I didn’t have time to dive deep into it today but it should be figured out.

3 Likes