instructure / canvas-lms

The open LMS by Instructure, Inc.
https://github.com/instructure/canvas-lms/wiki
GNU Affero General Public License v3.0
5.67k stars 2.5k forks source link

Profile Picture not Displaying/Setting #1591

Open matthew119427 opened 4 years ago

matthew119427 commented 4 years ago

Summary:

Setting profile picture for the 1st administrator account doesn't appear to be working

Steps to reproduce:

  1. Login with the administrator account
  2. Set a profile picture

Expected behavior:

The profile picture is set.

Actual behavior:

It remains the default.

Additional notes:

The profile picture does show up in Files > Profile Pictures, however its not showing up on the user page or in thumbnails.

Here's some logs relating to the request from production.log

[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae] setup_live_events_context (1.2ms)
[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae]   SQL Attachment Load (3.4ms)  SELECT "attachments".* FROM "attachments" WHERE "attachments"."file_state" = 'available' AND "attachments"."id" = 23 AND "attachments"."uuid" = 'knromXv2P2WE5WktnTYEYqErCestiVWxZxaoiJJf' ORDER BY "attachments"."id" ASC LIMIT 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae]   SQL Thumbnail Load (1.4ms)  SELECT "thumbnails".* FROM "thumbnails" WHERE "thumbnails"."parent_id" = 23 AND "thumbnails"."thumbnail" = 'thumb' LIMIT 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae]   SQL Attachment Load (2.0ms)  SELECT "attachments".* FROM "attachments" WHERE "attachments"."id" = 23 LIMIT 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae]   SQL User Load (1.7ms)  SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae]   SQL Account Load (1.8ms)  SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = 1 LIMIT 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae] Redirected to https://site.com/images/thumbnails/show/11/DuDDj42xfpq7L1tdDQbtQvH9mD9IVQfJoQNN3gPt
[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae]   SQL Account Load (4.9ms)  SELECT "accounts".* FROM "accounts" INNER JOIN "user_account_associations" ON "accounts"."id" = "user_account_associations"."account_id" WHERE "user_account_associations"."user_id" = 1 AND (accounts.id = 1 OR accounts.root_account_id = 1) ORDER BY user_account_associations.depth  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae]   SQL  (4.5ms)  SELECT DISTINCT "account_id" FROM "enrollments" INNER JOIN "courses" ON "courses"."id" = "enrollments"."course_id" WHERE "enrollments"."root_account_id" = 1 AND (enrollments.workflow_state='active' AND (courses.workflow_state='available' OR courses.workflow_state IN ('created', 'claimed') AND enrollments.type IN ('TeacherEnrollment','TaEnrollment','DesignerEnrollment','StudentViewEnrollment')) OR enrollments.workflow_state = 'completed') AND "enrollments"."user_id" = 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae]   CACHE SQL Account Load (0.1ms)  1::SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = 1 LIMIT 1
[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae]   SQL FeatureFlag Load (2.3ms)  SELECT "feature_flags".* FROM "feature_flags" WHERE "feature_flags"."feature" = 'javascript_csp' AND ((context_id='2' AND context_type='Account')) ORDER BY "feature_flags"."id" ASC LIMIT 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae]   SQL FeatureFlag Load (1.9ms)  SELECT "feature_flags".* FROM "feature_flags" WHERE "feature_flags"."feature" = 'javascript_csp' AND ((context_id='1' AND context_type='Account')) ORDER BY "feature_flags"."id" ASC LIMIT 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae] Completed 302 Found in 134ms (ActiveRecord: 30.3ms)
[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae] [STATSD] (sql_read: 10.00) (sql_write: 0.00) (sql_cache: 0.00) (active_record: 11.00) (cache_read: 10.00) (total: 134.26) (db: 30.28)
[6f7810cc33c7a5949771dfa116f84c23 5e0a601b-3229-4a5b-9afb-c9b4f96146ae] [STAT] 1356868 1356868 0 1356868 0.12000000000000455 0.009999999999999787
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53] Started GET "/images/thumbnails/show/11/DuDDj42xfpq7L1tdDQbtQvH9mD9IVQfJoQNN3gPt" for 24.149.102.127 at 2020-03-19 19:07:57 -0400
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53]   SQL PluginSetting Load (2.0ms)  SELECT "plugin_settings".* FROM "plugin_settings" WHERE "plugin_settings"."name" = 'sessions' ORDER BY "plugin_settings"."id" ASC LIMIT 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53] Processing by FilesController#show_thumbnail as HTML
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53]   Parameters: {"id"=>"11", "uuid"=>"DuDDj42xfpq7L1tdDQbtQvH9mD9IVQfJoQNN3gPt"}
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53]   SQL SQL (4.8ms)  SELECT "pseudonyms"."id" AS t0_r0, "pseudonyms"."user_id" AS t0_r1, "pseudonyms"."account_id" AS t0_r2, "pseudonyms"."workflow_state" AS t0_r3, "pseudonyms"."unique_id" AS t0_r4, "pseudonyms"."crypted_password" AS t0_r5, "pseudonyms"."password_salt" AS t0_r6, "pseudonyms"."persistence_token" AS t0_r7, "pseudonyms"."single_access_token" AS t0_r8, "pseudonyms"."perishable_token" AS t0_r9, "pseudonyms"."login_count" AS t0_r10, "pseudonyms"."failed_login_count" AS t0_r11, "pseudonyms"."last_request_at" AS t0_r12, "pseudonyms"."last_login_at" AS t0_r13, "pseudonyms"."current_login_at" AS t0_r14, "pseudonyms"."last_login_ip" AS t0_r15, "pseudonyms"."current_login_ip" AS t0_r16, "pseudonyms"."reset_password_token" AS t0_r17, "pseudonyms"."position" AS t0_r18, "pseudonyms"."created_at" AS t0_r19, "pseudonyms"."updated_at" AS t0_r20, "pseudonyms"."password_auto_generated" AS t0_r21, "pseudonyms"."deleted_at" AS t0_r22, "pseudonyms"."sis_batch_id" AS t0_r23, "pseudonyms"."sis_user_id" AS t0_r24, "pseudonyms"."sis_ssha" AS t0_r25, "pseudonyms"."communication_channel_id" AS t0_r26, "pseudonyms"."sis_communication_channel_id" AS t0_r27, "pseudonyms"."stuck_sis_fields" AS t0_r28, "pseudonyms"."integration_id" AS t0_r29, "pseudonyms"."authentication_provider_id" AS t0_r30, "users"."id" AS t1_r0, "users"."name" AS t1_r1, "users"."sortable_name" AS t1_r2, "users"."workflow_state" AS t1_r3, "users"."time_zone" AS t1_r4, "users"."uuid" AS t1_r5, "users"."created_at" AS t1_r6, "users"."updated_at" AS t1_r7, "users"."avatar_image_url" AS t1_r8, "users"."avatar_image_source" AS t1_r9, "users"."avatar_image_updated_at" AS t1_r10, "users"."phone" AS t1_r11, "users"."school_name" AS t1_r12, "users"."school_position" AS t1_r13, "users"."short_name" AS t1_r14, "users"."deleted_at" AS t1_r15, "users"."show_user_services" AS t1_r16, "users"."gender" AS t1_r17, "users"."page_views_count" AS t1_r18, "users"."reminder_time_for_due_dates" AS t1_r19, "users"."reminder_time_for_grading" AS t1_r20, "users"."storage_quota" AS t1_r21, "users"."visible_inbox_types" AS t1_r22, "users"."last_user_note" AS t1_r23, "users"."subscribe_to_emails" AS t1_r24, "users"."features_used" AS t1_r25, "users"."preferences" AS t1_r26, "users"."avatar_state" AS t1_r27, "users"."locale" AS t1_r28, "users"."browser_locale" AS t1_r29, "users"."unread_conversations_count" AS t1_r30, "users"."stuck_sis_fields" AS t1_r31, "users"."public" AS t1_r32, "users"."birthdate" AS t1_r33, "users"."otp_secret_key_enc" AS t1_r34, "users"."otp_secret_key_salt" AS t1_r35, "users"."otp_communication_channel_id" AS t1_r36, "users"."initial_enrollment_type" AS t1_r37, "users"."crocodoc_id" AS t1_r38, "users"."last_logged_out" AS t1_r39, "users"."lti_context_id" AS t1_r40, "users"."turnitin_id" AS t1_r41, "users"."lti_id" AS t1_r42, "users"."pronouns" AS t1_r43 FROM "pseudonyms" LEFT OUTER JOIN "users" ON "users"."id" = "pseudonyms"."user_id" WHERE "pseudonyms"."id" = 1 LIMIT 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53] setup_live_events_context (1.0ms)
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53]   SQL Thumbnail Load (2.2ms)  SELECT "thumbnails".* FROM "thumbnails" WHERE "thumbnails"."id" = 11 AND "thumbnails"."uuid" = 'DuDDj42xfpq7L1tdDQbtQvH9mD9IVQfJoQNN3gPt' ORDER BY "thumbnails"."id" ASC LIMIT 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53] Sent file /opt/canvas/tmp/files/0000/0023/1584659275_689__profile_thumb.jpg (0.5ms)
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53]   SQL Account Load (3.4ms)  SELECT "accounts".* FROM "accounts" INNER JOIN "user_account_associations" ON "accounts"."id" = "user_account_associations"."account_id" WHERE "user_account_associations"."user_id" = 1 AND (accounts.id = 1 OR accounts.root_account_id = 1) ORDER BY user_account_associations.depth  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53]   SQL  (6.7ms)  SELECT DISTINCT "account_id" FROM "enrollments" INNER JOIN "courses" ON "courses"."id" = "enrollments"."course_id" WHERE "enrollments"."root_account_id" = 1 AND (enrollments.workflow_state='active' AND (courses.workflow_state='available' OR courses.workflow_state IN ('created', 'claimed') AND enrollments.type IN ('TeacherEnrollment','TaEnrollment','DesignerEnrollment','StudentViewEnrollment')) OR enrollments.workflow_state = 'completed') AND "enrollments"."user_id" = 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53]   SQL Account Load (2.2ms)  SELECT "accounts".* FROM "accounts" WHERE "accounts"."id" = 1 LIMIT 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53]   SQL FeatureFlag Load (2.2ms)  SELECT "feature_flags".* FROM "feature_flags" WHERE "feature_flags"."feature" = 'javascript_csp' AND ((context_id='2' AND context_type='Account')) ORDER BY "feature_flags"."id" ASC LIMIT 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53]   SQL FeatureFlag Load (1.7ms)  SELECT "feature_flags".* FROM "feature_flags" WHERE "feature_flags"."feature" = 'javascript_csp' AND ((context_id='1' AND context_type='Account')) ORDER BY "feature_flags"."id" ASC LIMIT 1  [production:1 master]
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53] Completed 200 OK in 97ms (ActiveRecord: 23.3ms)
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53] [STATSD] (sql_read: 6.00) (sql_write: 0.00) (sql_cache: 0.00) (active_record: 7.00) (cache_read: 6.00) (total: 97.39) (db: 23.31)
[6f7810cc33c7a5949771dfa116f84c23 004cd757-9782-4b22-953c-0ac90e13fc53] [STAT] 1356868 1356868 0 1356868 0.10000000000002274 0.0
matthew119427 commented 4 years ago

Additional Note:

Other users appear to be able to correctly set a picture.

matthew119427 commented 4 years ago

Additional Note x2: This only appears to affect users which are in the already created Site Admin account. If the user is not in that account, they can set a picture.

jmdepili commented 4 years ago

Additional Note x2: This only appears to affect users which are in the already created Site Admin account. If the user is not in that account, they can set a picture.

Hi Matthew,

Have you resolved this issue? How did you do it? Hope you could help me on this too...

matthew119427 commented 4 years ago

I didn't resolve it, the resolution I've found is make another site/organization account and make your main account on there.

jmdepili commented 4 years ago

I didn't resolve it, the resolution I've found is make another site/organization account and make your main account on there.

Thank you Matthew, try to see if that will work on me too... keep safe..

jmdepili commented 4 years ago

I didn't resolve it, the resolution I've found is make another site/organization account and make your main account on there.

Hi Matthew, do you have a guide on how to create another site/organization account? Thanks in advance :-)

jmdepili commented 4 years ago

Found the solution... need to uncomment the file domain in domain.yml...