Closed Bug 568892 Opened 14 years ago Closed 14 years ago

user profile pic not displayed in zamboni

Categories

(addons.mozilla.org Graveyard :: Public Pages, defect)

defect
Not set
major

Tracking

(Not tracked)

VERIFIED FIXED
5.11.2

People

(Reporter: krupa.mozbugs, Assigned: clouserw)

References

()

Details

(Whiteboard: [z])

Attachments

(1 obsolete file)

steps to reproduce:
1.Go to https://preview.addons.mozilla.org/z/en-US/firefox/user/167/
2.Compare it to https://preview.addons.mozilla.org/en-US/firefox/user/167/

observed behavior:
User profile pic is missing in zamboni
This should just be a matter of changing settings.USER_PIC_URL
Attached patch fix (obsolete) — Splinter Review
I think this will fix the problem; it switches the URL back to what remora is using.

I don't know what the split_id regex was though - any ideas?  I got rid of it for now, but was that an attempt to partition user images or something?
Assignee: nobody → clouserw
Attachment #448464 - Flags: review?(fwenzel)
Comment on attachment 448464 [details] [diff] [review]
fix

Umm...I don't think that's the answer anymore.

We have similar logic in getUserPicturePath() in remora, but the only place I see it used is the avatar in the "Meet the Developers" module on add-on detail pages.  User pages, and the actual Meet the Developers page all seem to use the format in the patch above.  Which I guess is why he doesn't have a picture on https://addons.mozilla.org/en-US/firefox/addon/684/ .

Anyway, the format coming off /img/uploads/ is better, so the bug here is "why aren't some photos from remora showing up in the /img/uploads/ directory?"

Mine works: https://preview.addons.mozilla.org/z/en-US/firefox/user/10482/
Attachment #448464 - Flags: review?(fwenzel) → review-
Attachment #448464 - Attachment is obsolete: true
Attachment #448464 - Flags: review-
(In reply to comment #2)
> I don't know what the split_id regex was though - any ideas?  I got rid of it
> for now, but was that an attempt to partition user images or something?

FWIW, the regex is derived from Remora's .htaccess file, it cuts the user id into pieces to use as subdirectories in the upload dir.

(In reply to comment #3)
> Anyway, the format coming off /img/uploads/ is better, so the bug here is "why
> aren't some photos from remora showing up in the /img/uploads/ directory?"

My educated guess is: Because they don't have an image type set? Only if a (MIME?) type is set in the database, we show the image, otherwise we use the anonymous dude. I am guessing this logic isn't present in Remora, which is why flawed data isn't noticeable. That, of course, raises the question, why do some users have pictures on the server but their picture_type field is still empty?
Target Milestone: 5.11 → 5.11.1
Blocks: 564519
Target Milestone: 5.11.1 → 5.11.2
I wrote a script that looks at all the files on disk and fixes up the mimetypes in the database.  Once I started looking at remora though, things took a turn for the weird.  Remora doesn't actually use the picture_type field in the database at all.  In fact, remora has writing the files hardcoded to .png, and all the redirects are hardcoded to .png too.  The only reason the mimetypes work in remora is because apache is serving the files.

So, my script still works, remora is just broken.  Anyway, r?fwenzel http://github.com/clouserw/zamboni/commit/3501a5c04309421ae4a584ba05fb9b3de812cfca
Depends on: 571405
No longer depends on: 571405
That looks good. r+. I am wondering though, if neither Remora nor Zamboni use picture_type, shouldn't we delete it? And if Zamboni does use it, you should set it in your script.
Script deployed and ran on preview.  Calling this fixed.
Status: NEW → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Depends on: 572794
verified at https://next.addons.mozilla.org/en-US/firefox/user/4612488/
Status: RESOLVED → VERIFIED
Product: addons.mozilla.org → addons.mozilla.org Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: