Unable to obtain gravatar on profile edition screen


(Samy Rabih) #1

Hi
I encountered the following problem : on a fresh Discourse installation, in /users/MYUSERNAME/preferences screen, if you want to change your personal avatar, the Gravatar retrieval is broken.

What it happens:

"Discourse.ajax is not defined" error, here:
    return Discourse.ajax("/user_avatar/" + this.get("username") + "/refresh_gravatar.json", { method: "POST" }).then(function (result) {
              return _this.setProperties({
                gravatar_avatar_template: result.gravatar_avatar_template,
                gravatar_avatar_upload_id: result.gravatar_upload_id
              });
            }).finally(function () {
              return _this.set("gravatarRefreshDisabled", false);
            }); 

To reproduce it:

  • use as your profile email a Gravatar-enabled email
  • click on the pen just right your default avatar (“S” in my case)
  • choose the second option, “Gravatar”
  • click on the “double arrow button” (to refresh the gravatar)

(Jeff Atwood) #2

Can we repro this @techapj?


(Alan Tan) #3

I can reproduce this. Fixed in

We probably didn’t catch this because of the way the code was indented.


Updated image on gravatar, not seeing it update on site
(Alan Tan) #4