Can't change picture on QMO

VERIFIED FIXED

Status

P1
major
VERIFIED FIXED
10 years ago
9 years ago

People

(Reporter: cmtalbert, Assigned: oremj)

Tracking

Details

Attachments

(3 attachments)

(Reporter)

Description

10 years ago
1. Log into QMO, go to user preferneces page
2. Attempt to upload a new picture

= Expected =
The picture should change and life should be easy

= Actual =
The picture doesn't change, and what's worse it resurrects some picture that you probably never should have sent it in the first place.  You can tell it to delete the offending picture, and the next time you upload a new picture it re-displays the picture it was supposed to delete.

I think what is happening here is that the old picture was from before QMO was launched, and it is pulling that thing out of the database.

Note: upon first login to the preferences page, there is no picture displayed.  The offending pic is only displayed when I attempt to upload a new one.  So, I think my "hasPicture" entry in the database (or whathave you) is completely hosed.
confirmed, its strange , the old picture is displayed and does not care about the picture that is uploaded. I agree with Clint, this seems to be Database Problem, because it works for my account as example.

Alex, can you take a look at this ?
OS: Mac OS X → All
Hardware: x86 → All
Assignee: nobody → buchanae
Mass move of bugs to new product
Component: quality.mozilla.org → QMO: Website
Product: Websites → QMO

Updated

10 years ago
Priority: -- → P1
Alex, do you have any pointers on this, can you handle it, need help?
(In reply to comment #3)
> Alex, do you have any pointers on this, can you handle it, need help?

Paul, go ahead an take this if you want, I don't have the bandwidth to work on it anytime soon.  

If I remember, there was a problem with image paths being stuck in the DB while that DB moved from/to different base URLS

e.g. on staging, someone would have created an image, and it would have been saved in the DB as "http://qmo2.staging.example.com" then when the site was moved, that path was no longer valid.

So, I'd start by looking for where/how these profile pictures are saved, both in the DB and the corresponding files in the filesystem.  Hopefully once you get that figured out, the bug will jump up and say "squash me!"

Thanks for picking this up, ping me if you need anything
Does this still happen?
Assignee: buchanae → paul.craciunoiu
Target Milestone: --- → 1.0
After playing around with this, it seems to be a cache issue. I'll attach the headers for both of these. My guess is that it's an IT thing, with cache expiry for images and such.
I can get the picture to change after a while, though. We could get a couple of people to try it and see if it changes after a day or so (expiry date seems to be a day).
At any rate, this is a problem, and if we wish to make the profile pictures readily viewable on upload, we can try having IT take a look at this.
Created attachment 388005 [details]
local headers from khan (pictures updates after refresh)
Created attachment 388006 [details]
headers from production
Created attachment 388007 [details]
headers from stage
Please see comment #6. Ideally, we can change the cache expiry time for profile pictures only.
Assignee: paul.craciunoiu → server-ops
Bumping this up, at least to get some investigation going.
Severity: normal → major
(Assignee)

Updated

9 years ago
Assignee: server-ops → oremj
Jeremy, when will you have time to look at this?
(Assignee)

Comment 13

9 years ago
Is it acceptable to cache these images? If so for how long? Are profile pictures identified by "/sites/.*/files/picture.*png$"?
(In reply to comment #13)
> Is it acceptable to cache these images? If so for how long?
Ideally, the cache for each user picture should be cleared when the image changes (i.e. watch the "files/" folder and clear the cached version --but not the entire cache) when a specific file changes).
That would be best, and then you have cache last "forever". How difficult is that to implement?
> Are profile pictures identified by "/sites/.*/files/picture.*png$"?
Close. profile pictures are in "sites/*/files/picture-*.png"
(Assignee)

Comment 15

9 years ago
That would have to be implemented by modifying drupal. Basically user pictur references would contain a query string with the last modification time e.g., sites/../files/picture-222.png?1247878276. Every time the user uploaded a new picture the query string would change. 

Does that sound possible to implement? If not I can just change the cache to a few seconds or not cache them completely.
I could timestamp profile pictures, but it's probably not worth the development time when the latter option is (I'm assuming) easy. Is the traffic low enough to set the cache to a few seconds? Say 5 or 10?
(Assignee)

Comment 17

9 years ago
Changed picture cache to 5 seconds.
Status: NEW → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Changed picture twice without any issues. Clint, can you upload a profile picture onto QMO?
Status: RESOLVED → VERIFIED
(Reporter)

Comment 19

9 years ago
(In reply to comment #18)
> Changed picture twice without any issues. Clint, can you upload a profile
> picture onto QMO?

done.
Target Milestone: 2.0 → ---
You need to log in before you can comment on or make changes to this bug.