No avatar since GitLab 6.8
Hi! I've upgrader my GitLab to 6.8 version. But since the upgrade, the default no_avatar image does not display. After somes research, the image called is /assets/no_avatar.png But in my assets folder, the image is no_avatar-1af60455b82013dc3c9d9079cb021d47.png
So i've an 404 error from nginx.
Thanks!
Designs
- Show closed items
Activity
-
Newest first Oldest first
-
Show all activity Show comments only Show history only
- Maintainer
Can you try running
sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production
from/home/git/gitlab
, please? This might fix your issue. - Author
Hi!
Here the result:
user@server:/home/git/gitlab$ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production user@server:/home/git/gitlab$ ls -l public/assets/ total 5716 -rw-r--r-- 1 git git 257423 avril 25 14:51 application-813210a046db0add6f14de3f24064270.css -rw-r--r-- 1 git git 44322 avril 25 14:51 application-813210a046db0add6f14de3f24064270.css.gz -rw-r--r-- 1 git git 231137 mars 31 15:19 application-897f0cf2f0eae96fbe1162dd7e53f5f1.css -rw-r--r-- 1 git git 40656 mars 31 15:19 application-897f0cf2f0eae96fbe1162dd7e53f5f1.css.gz -rw-r--r-- 1 git git 1126538 avril 11 18:23 application-9fc13fcf7c6d49d3ae20fa29a30b85f7.js -rw-r--r-- 1 git git 334684 avril 11 18:23 application-9fc13fcf7c6d49d3ae20fa29a30b85f7.js.gz -rw-r--r-- 1 git git 1137524 mars 31 15:19 application-b9c1f40e62ffda90f0141aab0db8cd6d.js -rw-r--r-- 1 git git 338845 mars 31 15:19 application-b9c1f40e62ffda90f0141aab0db8cd6d.js.gz -rw-r--r-- 1 git git 1127423 avril 25 14:51 application-c829d5570fd54ca20cb3a55ba2620093.js -rw-r--r-- 1 git git 334716 avril 25 14:51 application-c829d5570fd54ca20cb3a55ba2620093.js.gz drwxr-xr-x 2 git git 4096 mars 31 15:29 authbuttons -rw-r--r-- 1 git git 2976 mars 31 15:05 bg_fallback-dc07f268f90614b9cea7cfe129fb9576.png -rw-r--r-- 1 git git 210 mars 31 15:05 bg-header-806c39c279e4b2b346dfcf242c22142e.png drwxr-xr-x 2 git git 4096 mars 31 15:31 bootstrap -rw-r--r-- 1 git git 396 mars 31 15:05 chosen-sprite-ae114553cce9f5652955c2a3d78b7507.png -rw-r--r-- 1 git git 9873 mars 31 15:05 dark-scheme-preview-ba59d4ec9e203728465687ecc83c7349.png -rw-r--r-- 1 git git 691 mars 31 15:05 diff_note_add-0030fca80630ec2757f2b55852341991.png drwxr-xr-x 14 git git 20480 mars 31 15:32 emoji -rw-r--r-- 1 git git 32988 mars 31 15:05 favicon-220424ba6cb497309f8faf8545eb5408.ico -rw-r--r-- 1 git git 219 mars 31 15:05 file_bin-5626eb984a9539f764e5f5f969943fdb.png -rw-r--r-- 1 git git 1648 mars 31 15:05 file_dir-0f177e1b414e38755fe1f6caf9a0d5d8.png -rw-r--r-- 1 git git 319 mars 31 15:05 file_empty-3badc2619bb84014cc56652f97527309.png -rw-r--r-- 1 git git 536 mars 31 15:05 file_img-51fdf1d1cac83d82b9f1de51679faf90.png -rw-r--r-- 1 git git 463 mars 31 15:05 file_txt-aba7cd46eaa7b0a29d1bbca0eaa54480.png -rw-r--r-- 1 git git 61896 mars 31 15:16 FontAwesome-bd49fa8bb0228cd837c96b46fd8c822b.otf -rwxr-xr-x 1 git git 79076 mars 31 15:16 fontawesome-webfont-5b9fb9036fc4d520035145e9ad2c8572.ttf -rwxr-xr-x 1 git git 43572 mars 31 15:16 fontawesome-webfont-7106daba96a27f3af06d179d65dba7b2.woff -rwxr-xr-x 1 git git 37405 mars 31 15:16 fontawesome-webfont-9191785c21225c4107a2e4cb2efc01fc.eot -rwxr-xr-x 1 git git 197829 mars 31 15:16 fontawesome-webfont-ee58ed7ec22b072487557ff3fcbf4653.svg -rw-r--r-- 1 git git 1019 mars 31 15:05 icon-link-a5bbeb5c2d1859b3a2801eae59208248.png -rw-r--r-- 1 git git 331 mars 31 15:05 icon-search-f7b985318f7bbde4b755f85128078705.png -rw-r--r-- 1 git git 2782 mars 31 15:05 icon_sprite-f7fea6274e15c52754f3a96240f5011e.png -rw-r--r-- 1 git git 6644 mars 31 15:05 images-d275fa75bb1aa7eab002b69d6b530410.png -rw-r--r-- 1 git git 2797 mars 31 15:05 logo-black-314a0a82875402e4f659a83d71c35142.png -rw-r--r-- 1 git git 7501 mars 31 15:05 logo-white-67df65ed619f59dbc0cb6d47aac306d6.png -rw-r--r-- 1 git git 155568 avril 25 15:19 manifest-f66f91fe72aab088251b05d5a96ffffa.json -rw-r--r-- 1 git git 4332 mars 31 15:05 monokai-scheme-preview-7826f5b6f495cd25e02b2020d8857def.png -rw-r--r-- 1 git git 260 mars 31 15:05 move-09dbd9842984c7d6cade189354728ff8.png -rw-r--r-- 1 git git 704 mars 31 15:05 no_avatar-1af60455b82013dc3c9d9079cb021d47.png -rw-r--r-- 1 git git 4884 mars 31 15:05 no_group_avatar-cf889ff08c83e674fac2d2c2276cdcbc.png -rw-r--r-- 1 git git 548 mars 31 15:05 onion_skin_sprites-b775aec89c84ffc7bbaea7f99b88aa60.gif -rw-r--r-- 1 git git 411 avril 25 14:51 print-133dbf6c5049e528c5ed63754a3c2ae7.css -rw-r--r-- 1 git git 225 avril 25 14:51 print-133dbf6c5049e528c5ed63754a3c2ae7.css.gz -rw-r--r-- 1 git git 494 mars 31 15:05 progress_bar-bd4b392f94eca3f2ce87c04f2b209ee5.gif -rw-r--r-- 1 git git 812 mars 31 15:05 rss_ui-bebaa0ece83006c146e1dfa784cc41a4.png -rw-r--r-- 1 git git 613 mars 31 15:19 select2-889410bfbce886fd69fff35a71f8e308.png -rw-r--r-- 1 git git 1849 mars 31 15:19 select2-spinner-1d29e8bcd0484b44929aecda8a9e9871.gif -rw-r--r-- 1 git git 845 mars 31 15:19 select2x2-48776b6aea98108e6ea8d48509e351e9.png -rw-r--r-- 1 git git 4122 mars 31 15:05 slider_handles-9ed085d39487cf67d866f8326bdae1c3.png -rw-r--r-- 1 git git 9902 mars 31 15:05 solarized-dark-scheme-preview-cd64c7e3a3ab3c345379fe340c8a0cda.png -rw-r--r-- 1 git git 737 mars 31 15:05 Storage-UI-163cdd9142fca6baec4186e689866f40.PNG -rw-r--r-- 1 git git 641 mars 31 15:05 submodule-0c306d9edc7045bd7689f4a663e27679.png -rw-r--r-- 1 git git 505 mars 31 15:05 swipemode_sprites-3932627c3ae11db54af00ee183a21ab0.gif -rw-r--r-- 1 git git 1197 mars 31 15:05 switch_icon-a0a08a150967f7cd7989491e1bbb7df8.png -rw-r--r-- 1 git git 50 mars 31 15:05 trans_bg-5797c598d97f42c5ace4321c7b368f9b.gif -rw-r--r-- 1 git git 4193 mars 31 15:05 ui-icons_222222_256x240-102ebddd325f4b2b3f8dce08f4aad21f.png -rw-r--r-- 1 git git 4193 mars 31 15:05 ui-icons_454545_256x240-230da3fe6c0c23fcf2099f0186a1414e.png -rw-r--r-- 1 git git 10022 mars 31 15:05 white-scheme-preview-010a1fcef51be33a0e6b9829cdeff2e3.png
And after, with Chrome and Firefox as a fresh navigator:
... <img alt="" class="avatar s24" src="/assets/no_avatar.png"> ...
Thanks!
- Author
And when I look at the code (i'm not an ruby or rails expert
) : https://gitlab.com/gitlab-org/gitlab-ce/blob/master/app/assets/javascripts/users_select.js.coffee#L10avatar = gon.relative_url_root + "/assets/no_avatar.png"
I don't see any reference of the hash string!
- Maintainer
Rails compiles assets for performance reasons. It puts the hash in there and it knows how to handle that internally. It's kind of like Java with JAWR if you're familiar with that. Another issue could be that Apache cannot serve up the static content. But that seems unlikely since you're getting CSS and JS which are served up in the same manner.
- Maintainer
If you use your browser and go to
http://gitlab.example.com/assets/no_avatar-1af60455b82013dc3c9d9079cb021d47.png
do you see the image? - Author
Yes, I see the image. I've only the problem with this image
- Maintainer
I wonder if this is a browser caching issue. Can you try a different browser and/or a hard refresh in the browser?
I'm seeing this on a fresh install as well (CentOS 6.5 with omnibus 6.8.1 package). I'm using Chrome and the offending img tag renders as:
<img alt="User activity" src="">
- Author
I tried with Chrome and with a new version of Firefox (with fresh cache)
- Author
To solve this issue temporary, I've created a symlink to no_avatar.png with sudo -u git -H ln -s no_avatar-1af60455b82013dc3c9d9079cb021d47.png no_avatar.png
I've also reboot the server and tried another "assets:clean assets:precompile cache:clear"
Same for me, using Ubuntu 12.04, tried FF + IE
nginx error log shows
2014/04/30 09:05:46 [error] 1023#0: *101 open() "/home/git/gitlab/public/assets/no_avatar.png" failed (2: No such file or directory), client: xxx.xxx.xxx.xxx, server: myServer, request: "GET /assets/no_avatar.png HTTP/1.1", host: "MyHOst", referrer: "http://MyUrl/"
- Author
If it helps, i'm also on Ubuntu 12.04
Turns out my issue is a bug in omnibus-gitlab https://gitlab.com/gitlab-org/omnibus-gitlab/issues/112 that was setting the gravatar urls to blank by default.
- Author
Any updates? My simlink solution needs to be reapply every time i clear the cache.. Thanks!
cross reference: https://github.com/gitlabhq/gitlabhq/pull/6949
To reproduce this behavior it is needed to disable gravatar.com integration:
gravatar: enabled: false # Use user avatar image from Gravatar.com (default: true)
in
config/gitlab.yaml
- username-removed-25949 Status changed to closed
Status changed to closed
- Maintainer
This issue has been fixed 9 month ago.
#community-weekend-feb-2015
- username-removed-444 mentioned in commit 2ca2a893
mentioned in commit 2ca2a893
- username-removed-444 mentioned in commit 7a56693a
mentioned in commit 7a56693a
- username-removed-444 Mentioned in commit 2ca2a893
Mentioned in commit 2ca2a893
- username-removed-444 Mentioned in commit 7a56693a
Mentioned in commit 7a56693a
- Nikola Milojevic mentioned in merge request !14785
mentioned in merge request !14785