Default avatar not shown when Gravatar disabled
Summary
The user avatars are not rendered properly in the Protected Branches (and other) dropdown(s) in the project settings (see the attached screenshot). For users who have no avatar uploaded a "null" string is inserted as the IMG SRC instead of a default image.
This is happening on a self-hosted instance with Gravatar disabled.
Steps to reproduce
- Disable Gravatar under Settings/General/Account and limit
- Create a new user
- Assign the user permissions on a project
- Navigate to the project settings and under Repository/Protected Branches open one of the dropdown listing users
- The user will appear with a "broken" avatar image
What is the current bug behavior?
For users with avatar uploaded a "null" string is inserted as the IMG SRC instead of a default image in the dropdown.
What is the expected correct behavior?
Default image show be used as in other places across the application already.
Relevant logs and/or screenshots
See screenshot attached
Output of checks
(If you are reporting a bug on GitLab.com, write: This bug happens on GitLab.com)
Results of GitLab environment info
Expand for output related to GitLab environment info
System information System: Proxy: no Current User: git Using RVM: no Ruby Version: 2.6.6p146 Gem Version: 2.7.10 Bundler Version:1.17.3 Rake Version: 12.3.3 Redis Version: 5.0.9 Git Version: 2.27.0 Sidekiq Version:5.2.9 Go Version: go1.13.11 linux/amd64 GitLab information Version: 13.2.2-ee Revision: 618883a1f9d Directory: /opt/gitlab/embedded/service/gitlab-rails DB Adapter: PostgreSQL DB Version: 11.7 URL: https://gitlab.example.com HTTP Clone URL: https://gitlab.example.com/some-group/some-project.git SSH Clone URL: git@gitlab.example.com:some-group/some-project.git Elasticsearch: no Geo: no Using LDAP: yes Using Omniauth: yes Omniauth Providers: GitLab Shell Version: 13.3.0 Repository storage paths: - default: /gitlab-data-git/repositories GitLab Shell path: /opt/gitlab/embedded/service/gitlab-shell Git: /opt/gitlab/embedded/bin/git
Results of GitLab application Check
Expand for output related to the GitLab application check
Checking GitLab subtasks ...Checking GitLab Shell ...
GitLab Shell: ... GitLab Shell version >= 13.3.0 ? ... OK (13.3.0) Running /opt/gitlab/embedded/service/gitlab-shell/bin/check Internal API available: OK Redis available via internal API: OK gitlab-shell self-check successful
Checking GitLab Shell ... Finished
Checking Gitaly ...
Gitaly: ... default ... OK
Checking Gitaly ... Finished
Checking Sidekiq ...
Sidekiq: ... Running? ... yes Number of Sidekiq processes ... 1
Checking Sidekiq ... Finished
Checking Incoming Email ...
Incoming Email: ... Reply by email is disabled in config/gitlab.yml
Checking Incoming Email ... Finished
Checking LDAP ...
LDAP: ... Server: ldapmain LDAP authentication... Anonymous. No
bind_dn
orpassword
configured LDAP users with access to your GitLab server (only showing the first 100 results) User output sanitized. Found 100 users of 100 limit.Checking LDAP ... Finished
Checking GitLab App ...
Git configured correctly? ... yes Database config exists? ... yes All migrations up? ... yes Database contains orphaned GroupMembers? ... no GitLab config exists? ... yes GitLab config up to date? ... yes Log directory writable? ... yes Tmp directory writable? ... yes Uploads directory exists? ... yes Uploads directory has correct permissions? ... yes Uploads directory tmp has correct permissions? ... yes Init script exists? ... skipped (omnibus-gitlab has no init script) Init script up-to-date? ... skipped (omnibus-gitlab has no init script) Projects have namespace: ... 5/3 ... yes 10/4 ... yes 9/5 ... yes 15/6 ... yes 2/8 ... yes 21/9 ... yes 22/10 ... yes 22/11 ... yes 21/12 ... yes 28/13 ... yes 29/14 ... yes 23/15 ... yes 23/16 ... yes 38/18 ... yes 42/20 ... yes 42/21 ... yes 42/22 ... yes 42/23 ... yes 42/25 ... yes 44/26 ... yes 44/27 ... yes 39/28 ... yes 6/29 ... yes 47/30 ... yes 47/31 ... yes 50/32 ... yes 50/33 ... yes 50/34 ... yes 51/35 ... yes 52/36 ... yes 55/37 ... yes 56/38 ... yes 57/39 ... yes 58/40 ... yes 59/41 ... yes 53/42 ... yes 53/43 ... yes 53/44 ... yes 62/45 ... yes 63/46 ... yes 64/47 ... yes 65/48 ... yes 65/49 ... yes 2/50 ... yes 39/51 ... yes 69/52 ... yes 71/53 ... yes 72/54 ... yes 72/55 ... yes 74/56 ... yes 74/57 ... yes 77/58 ... yes 80/59 ... yes 80/60 ... yes 80/61 ... yes 80/62 ... yes 80/63 ... yes 80/64 ... yes 80/65 ... yes 80/66 ... yes 81/67 ... yes 39/68 ... yes 83/69 ... yes 84/70 ... yes 85/71 ... yes 90/72 ... yes 3/73 ... yes Redis version >= 4.0.0? ... yes Ruby version >= 2.5.3 ? ... yes (2.6.6) Git version >= 2.22.0 ? ... yes (2.27.0) Git user has default SSH configuration? ... yes Active users: ... 39 Is authorized keys file accessible? ... yes GitLab configured to store new projects in hashed storage? ... yes All projects are in hashed storage? ... yes Elasticsearch version 6.x - 7.x? ... skipped (elasticsearch is disabled)
Checking GitLab App ... Finished
Checking GitLab subtasks ... Finished!
Possible fixes
N/A
Customer Ticket #167220(internal)