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


(Allen - Watchman Monitoring) #1

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:


(Jeff Atwood) #2

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


(Allen - Watchman Monitoring) #3

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.


(Allen - Watchman Monitoring) #4

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: )


(Jeff Atwood) #5

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


(Jeff Atwood) #6

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.


(Allen - Watchman Monitoring) #7
  • 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

Wish I could edit a user's full name from admin
(Jeff Atwood) #8
  • 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.


(Allen - Watchman Monitoring) #9

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.


(Régis Hanol) #10

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:


(Robin Ward) #11

Here’s a fix for this:

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


(Régis Hanol) #12

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


(Robin Ward) #13

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


(Jeff Atwood) #14