Hi, one forum member asked me what happened with her avatar based on gravatar. It became default:
First we tried to apply new gravatar picture and clean browser cache - nothing changes, then upload custom picture - it is shown in preview only. Logs are clean. Now we can switch between default grey icon and ‘S’ system icon.
I found the following topic where is described how to reset all avatars, maybe there is a command how to reset avatar for certain user? But I am not sure that it is a solution, anyway… I cannot restart/rebuild forum right now. The problem persists only for one person.
Hi Alan,
Only one user affected. I checked the database and see, that table uploads missed one ID, the user 540 probably uploaded more than three avatars:
Just for info, I tried to play with backup and rebuild does not fix the problem. I can see preview the image after upload, but it disappears after save changes. Both forum admin (I am) and the user tried the same in two browsers on two different OS.
As for me, I have gravatar picture as well with the same settings (SSO forum email is secondary in gravatar service). All links in the database seem to be ok and they point to just uploaded picture, but in fact, it does not show…
What can I try else? v2.0.3 is used, not tests-passed.
Unfortunately nothing changes. The history was:
2018-08-08: Forum upgraded from v1.9.4 to v2.0.3 (using tag)
2018-08-09: User tried to change her avatar, uploading new file AV2.jpg. We don’t know the message was on user’s screen, probably about dimensions or filesize but the log returns 418 response. Comparing to database, I cannot find such file there, the line with obvious id=3465 is missed as well.
Started POST "/discuss/uploads.json?client_id=***&authenticity_token=***" for 46.0.*.* at 2018-08-09 18:43:21 +0000
Processing by UploadsController#create as JSON
Parameters: {"type"=>"avatar", "user_id"=>"540", "files"=>[#<ActionDispatch::Http::UploadedFile:0x00007f81c0c28550 @tempfile=#<Tempfile:/tmp/RackMultipart20180809-786-jqsr7k.jpg>, @original_filename="AV2.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"files[]\"; filename=\"AV2.jpg\"\r\nContent-Type: image/jpeg\r\n">], "client_id"=>"***", "authenticity_token"=>"***"}
Rendering text template
Rendered text template (0.0ms)
Completed 418 in 13ms (Views: 0.5ms | ActiveRecord: 2.8ms)
So after that the user cannot change her avatar . The file in /tmp folder already has deleted.
I can go to the user profile. I can change an avatar to
only. I can choose another options, gravatar and custom picture (custom picture even is shown in preview), but they always change to
after save.
Started POST "/discuss/uploads.json?client_id=***&authenticity_token=***" for 62.69.*.* at 2018-08-15 08:03:19 +0000
Processing by UploadsController#create as JSON
Parameters: {"type"=>"avatar", "user_id"=>"2189", "files"=>[#<ActionDispatch::Http::UploadedFile:0x00007f81c115a9b0 @tempfile=#<Tempfile:/tmp/RackMultipart20180815-225-17uact1.jpeg>, @original_filename="4b8a7b1cd5669d31405ad38562df55d6cf9e0554.jpeg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"files[]\"; filename=\"4b8a7b1cd5669d31405ad38562df55d6cf9e0554.jpeg\"\r\nContent-Type: image/jpeg\r\n">], "client_id"=>"***", "authenticity_token"=>"***"}
Rendering text template
Rendered text template (0.0ms)
Completed 418 in 15ms (Views: 0.7ms | ActiveRecord: 2.9ms)
I’ve tried to upload the same cat to problem user’s avatar without success (the same behavoiur as in point 1 above).
I guess the problem is that the current Docker image ships ImageMagick 7, but Discourse 2.0.3 was built for ImageMagick 6. There might be an incompatibility which prevents Discourse from successfully cropping the avatar.