Page MenuHomePhabricator

Gerrit 3.4 shows empty avatar next to usernames
Closed, ResolvedPublic


We do not use user avatars but Gerrit 3.4 shows an empty gray disk next to our user names.

We have previously encountered an issue with avatar but this one is different.

Filed to Upstream as

Event Timeline

From GET /config/server/info I get a PluginConfigInfo with:

"plugin" : {
   "js_resource_paths" : [

The doc states:

has_avatars: not set if false. Whether an avatar provider is registered.

js_resource_paths: A list of relative paths (strings). Each path points to a frontend plugin that should be loaded, e.g. plugins/codemirror_editor/static/codemirror_editor.js.

Thus we do not have an avatar provider.

In polygerrit-ui/app/elements/shared/gr-avatar/gr-avatars.ts, the GrAvatar element has:

@property({type: Boolean})
_hasAvatars = false;


this._hasAvatars = !!(cfg && cfg.plugin && cfg.plugin.has_avatars);

Which should hide it:

_updateAvatarURL() {
  if (!this._hasAvatars || !this.account) {
    this.hidden = true;
  this.hidden = false;

And in the DOM I see: <gr-avatar image-size="32" hidden="">. Gotta file it to Upstream :)

Upstream fix has been released in Gerrit 3.4.5

hashar closed subtask T315408: Upgrade Gerrit to 3.4.5 as Resolved.

Fixed after I have upgraded Gerrit to 3.4.5 via T315408

Thank you @Paladox for the fix!