How to recreate:
Look at most Drupal sites with a user list and pictures enables.
The pictures will stick out the frame containing the user data.
See example:
http://www.sitebuddy.com/profile

Note: This issue is also visible when using the function theme('profile_listing', $user_info, $profile); within a block with a border.

Thanks,
Christophe D.

Comments

Stefan Nagtegaal’s picture

Adding a <br class="clear" /> could probably fix these kind of things..

magico’s picture

Version: 4.7.2 » x.y.z

Confirmed in HEAD.
1. activate profile module
2. add a picture to any user
3. goto ?q=profile

Problem at theme_profile_listing.
Can be overrided on any theme.

ricabrantes’s picture

Version: x.y.z » 7.x-dev
Priority: Normal » Minor
StatusFileSize
new29.38 KB

This bug still active in D7.x-dev...

ricabrantes’s picture

Assigned: Unassigned » ricabrantes
Status: Active » Needs review
StatusFileSize
new328 bytes

This is my first patch, its very simple and only uses the css class clear-block to put the border correct.

This patch applies to D7, and i will post a D6 later... if this is accepted.

floretan’s picture

Status: Needs review » Needs work

This looks like a reasonable fix. Please make patch relative to the main drupal folder.

ricabrantes’s picture

Status: Needs work » Needs review
StatusFileSize
new580 bytes

this patch is relative to the main drupal folder..

magico’s picture

Status: Needs review » Needs work

The patch has an extra line in it
Only in drupal-7.x-dev/modules/profile: profile-listing.tpl.php~ that shouldn't be there

ricabrantes’s picture

Status: Needs work » Needs review
StatusFileSize
new527 bytes

Sorry.. Now is correct..

magico’s picture

Status: Needs review » Needs work

Invalid text encoding.

ricabrantes’s picture

StatusFileSize
new503 bytes
magico’s picture

Status: Needs work » Reviewed & tested by the community

Works as expected!

catch’s picture

Profile listings look broken out of the box without this, so +1 from me.

gábor hojtsy’s picture

Hm, is a border included in any of the default Drupal themes on profiles in user profile listings?

magico’s picture

@Gábor: what border? I don't think so, but I also don't know why you are asking that...

I suggest someone (ricabrantes?) , to put here a screenshot before and after the patch.

gábor hojtsy’s picture

@magico, well, because the issue is all about the picture going out of the "border". If there is no visible border, it looks the same with or without the patch from the looks of the screenshots posted above. (The borders shown on the screenshots above seem to be added for testing or by contrib themes).

catch’s picture

I think that red border is just to show the outline for the profile. If you have a bunch of profiles with images, then they all float into each other. Whether there's actually a border or not in the theme shouldn't affect the usefulness of this patch (although it does make it more obvious what's going on).

magico’s picture

Ok, indeed. My opinion follows the idea expressed above by catch.

dries’s picture

Version: 7.x-dev » 6.x-dev

Committed to CVS HEAD. Moving to D6 for Gabor to review.

gábor hojtsy’s picture

Status: Reviewed & tested by the community » Needs review
StatusFileSize
new73.95 KB

OK, let's discuss this a bit more. I'd like to be cautious with this, since it does introduce a change in style which might break themes. We have a theme on the Drupalcon Szeged 2008 management site for example, which shows this profile listing as a stack of business cards. Small but comprehensible picture here: http://hojtsy.hu/blog/2008-apr-19/peak-drupalcon-szeged-organization-web...

Now before this patch, I could make .profile {float: left;} and have that stacking effect. After this change, I would need to modify my theme, since the block clearing would break my stacking effect right? Drupal 6.3 is not supposed to break themes which worked with Drupal 6.2.

So my question above pointed at whether there is actually an issue here, or is this just something showing up with sloppy contrib/custom themes? The examples provided so far did not show that any profiles would stack on each others, the Garland example has an artificial border, and it does not show any stacking having only one user to list.

webchick’s picture

StatusFileSize
new37.46 KB

You can see this behaviour in Bluemarine in 6.x. Here's a screenshot of a fresh install + bluemarine + profile module + user pictures.

webchick’s picture

StatusFileSize
new37.61 KB

Here's the same screenshot, after the patch.

webchick’s picture

StatusFileSize
new36.36 KB

And this is the page with a .profile { float: left; } in style.css.

I've no idea if this is doing the intended behaviour or not, cos I have no test data, but it definitely looks similar to what you're doing @ drupaltown.

gábor hojtsy’s picture

Status: Needs review » Needs work

webchick: yep, that's not intended behavior (Joe User should be to the right to Sally Administrator on your latest screenshot). When you float the .profile to the left, it should stack multiple profiles side-by-side, until the next one does not fit into the width and goes to the next line. If we have issues with core themes, we should fix them within the core themes in 6.x IMHO, not to disrupt contrib/custom themes this way.

webchick’s picture

Ok, that makes sense. I personally won't have time to roll a patch for bluemarine to fix this there, but that'd be the way to fix this in 6.x. Probably worth checking the other core themes to see if any of the rest of them outline their profiles by default.

dave reid’s picture

Version: 6.x-dev » 7.x-dev
Assigned: ricabrantes » Unassigned
Issue tags: +CSS, +user pictures
yoroy’s picture

Version: 7.x-dev » 8.x-dev
Component: profile.module » markup

I'm not sure if this still needs a fix. As it is now, profile pictures do not have a clear-fix (?) class applied to them in D7/8

KrisBulman’s picture

Version: 8.x-dev » 7.x-dev
StatusFileSize
new90.91 KB
new98.02 KB

No themes in D8 actually have the line present because the "History" title is no longer present.

This is still a problem in stark and seven in D7. The way Bartik gets around it, is by overriding the the float:right from user.css. The way Garland gets around it is not displaying the title border at all.

This really is not presentable for core themes, and has been a long standing issue.

I propose we remove the "History" H3 title from existence, and/or not float the photo from user.css (one less override themers have to make)

I mentioned not floating the photo in #1217054: Clean up the CSS for User module

KrisBulman’s picture

I'm not sure either of these options are really viable now that d7 is in production now that i think about it..

* Removing content from profiles (the history title) might tick some people off.
(This was taken care of in d8 #1190218: Convert user-profile-category.tpl.php to HTML5 by removing the category template altogether)

* Removing the float altogether may also break some peoples reliance on core css to do this for them
(up for debate)

The best solution would be to simply move the heading title above the image, and the memory text below the image, then the image would appear under the heading, but beside the text. However the image & history markup is within two different templates.

So.. easy fix.. remove the underline?

  • Dries committed e19dfc7 on 8.3.x
    - Patch #67523 by ricabrantes: fixed theme issue with avatars on account...

  • Dries committed e19dfc7 on 8.3.x
    - Patch #67523 by ricabrantes: fixed theme issue with avatars on account...

  • Dries committed e19dfc7 on 8.4.x
    - Patch #67523 by ricabrantes: fixed theme issue with avatars on account...

  • Dries committed e19dfc7 on 8.4.x
    - Patch #67523 by ricabrantes: fixed theme issue with avatars on account...

  • Dries committed e19dfc7 on 9.1.x
    - Patch #67523 by ricabrantes: fixed theme issue with avatars on account...
larowlan’s picture

Issue summary: View changes
Status: Needs work » Fixed
Issue tags: +Bug Smash Initiative

This was committed in Mar 2020 according to the messages above

larowlan’s picture

Status: Fixed » Needs work
Issue tags: -Bug Smash Initiative

Sorry, missed that this was D7 still

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.