I'm not sure why this isn't causing tests to fail, but user_user_view() is printing out the user picture as a #value field instead of #markup. Changing the type doesn't make any effect on the page, but it corrects my future user profile patches (adding imagecache-style presets to user pictures) from failing the testing.

Comments

webchick’s picture

Status: Needs review » Needs work

Confirmed this functionality is not working in HEAD right now, and adding the patch fixes it.

However, we should fix that test that is erroneously passing while we're at it.

quicksketch’s picture

Status: Needs work » Needs review
StatusFileSize
new2.2 KB

Ah! Yes the test was not functioning correctly. We need to actually switch to the user's profile page before checking for the image. So now we're fixing the test and the actual page. :)

Fixes a few code comments also.

quicksketch’s picture

Status: Needs review » Needs work

Sorry this patch had some accidental code slip in. New patch coming up shortly.

quicksketch’s picture

Status: Needs work » Needs review
Issue tags: -Quick fix +user pictures, +simpletests
StatusFileSize
new3.12 KB

This patch has higher accuracy for checking for the user profile picture, though it needs some rather funky code to properly check for the output of theme('user_picture'). Not so sure this is a "No brainer" any more. Silly tests.

quicksketch’s picture

StatusFileSize
new3.11 KB

Spacing fixes.

quicksketch’s picture

StatusFileSize
new2.52 KB

Okay... another shot at this. This time omit one of the user profile picture checks entirely, since we were checking for the exact same thing twice. Instead of checking for the whole image we're now checking just for the ALT tag.

webchick’s picture

Status: Needs review » Needs work

Sorry, checking for 'alt' isn't sufficient. We need to check for the image path as well.

Just add that extra assertion and I'm fine committing this.

quicksketch’s picture

Assigned: quicksketch » Unassigned
Status: Needs work » Needs review
StatusFileSize
new3.18 KB

I'm feeling like #5 was probably the best approach at this, but here's an alternative: don't use the silly l() function. The l() function is adding in the "active" class that's futzing up our comparison. We can remove it and hand-type the link to avoid the differences. This patch is more accurate than checking for the src or alt tags alone, since it actually renders the entire tag rather than checking for strings which might (though unlikely) show up elsewhere on the page.

quicksketch’s picture

StatusFileSize
new2.74 KB

Sigh. Okay here's the "short version". It works but will break when I introduce the imagecache patch. We'll fix it again then.

quicksketch’s picture

StatusFileSize
new2.07 KB

Oops, still some cruft in there from the last patch.

webchick’s picture

Status: Needs review » Fixed

Committed #10 to HEAD + a small comment fix. Thank you!!! :)

quicksketch’s picture

Thanks webchick, you're a star.

drewish’s picture

Status: Fixed » Needs review

subscribing. it looks good to me but i'm tired.

dave reid’s picture

Status: Needs review » Fixed

Cross posted? Should we backport to 6.x?

webchick’s picture

No, #markup was added in D7. So D6 should be good.

Status: Fixed » Closed (fixed)
Issue tags: -user pictures, -simpletests

Automatically closed -- issue fixed for 2 weeks with no activity.