• Welcome to Simple Machines Community Forum. Please login or sign up.

[3035] BUG: Attachments rendering incorrectly

Started by timned88, February 14, 2009, 02:09:23 AM

Previous topic - Next topic

timned88

February 14, 2009, 02:09:23 AM Last Edit: March 24, 2009, 07:56:02 PM by regularexpression
Version SMF 2.0RC1
i have been getting a lot of complaints about attached images being pushed too  far to the right of the post and until recently have not been able to replicate the problem.  the problem is for guests and regular users ONLYadmins and mods are not affected

the problem is this...  there is a horizontal ruler that is not being displayed at the end of the post but is instead being rendered at the top of the post almost between the title of the post and the « Reply #15 on: Today at 12:08 PM » text.  it is pushed to the right for some reason, which is causing everything else to be pushed to the right (see screenshots).  i am trying to figure out if this is a css error or a bug in hardcode but have had no luck so far. 

here is the link to the full thread of what people are complaining about...   i am sure this should be an easy fix for someone.
http://www.themagicinpixels.com/forum/index.php/topic,3754.msg28370/topicseen.html#msg28370

in the bottom attachment for this message, arrow #1 is showing the second horizontal rule for the post with an attachment, #2 is showing how the image is pushed way right, #3 is showing the huge horizontal scrollbar for the affected posts.

i have tested this one a clean base install with nothing changed but the database copied over and this issue persists.   i cross posted this topic from the 2.0 support threads because it seems now to be a bug that needs to be looked at vs. a simple error on my part.

links
base install:  http://www.themagicinpixels.com/forum-testing



screenshots






karlbenson

February 14, 2009, 12:57:53 PM #1 Last Edit: February 14, 2009, 01:21:00 PM by regularexpression
Thanks.
We're already aware of the issue affecting attachments in certain browsers.

http://dev.simplemachines.org/mantis/view.php?id=3035

---
Note. some reports of this are related to custom themes using different css than default smf core theme for attachments.
http://www.simplemachines.org/community/index.php?topic=292347.msg1928870#msg1928870

timned88

regular, i am using the default theme with the wrapper, but this happened to me on a clean install that i created for testing purposes.  is there a work around or way to solve the issue?  i run a photography forum and attachments are critical to my members.  thanks.

karlbenson

There isn't a posted fix with it.

Its on the bugtracker. Hopefully it should be fixed for the next release.

timned88

i was hoping that you wouldn't say that :(
do you have any estimated time frame?

karlbenson

no.  RC2 will be "when its ready".

Although once its fixed on the svn, it might be possible for one of the team to provide the fix.
But even for when the devs will get to look it is unknown. [I can't speak for them].

I will link this topic to the bug report though.

timned88

i clicked through the link you provided but 3035 is not listed in the list of issues.

timned88

regular, could you tell me what files are involved in attachment rendering so I could try to come up with my own temp fix (and where to look in them if possible?).

karlbenson

see that link i posted above. It appears to be playing with css.
http://www.simplemachines.org/community/index.php?topic=292347.msg1928870#msg1928870

Themes/default/style.css

(if your using default theme, then style.css in those themes aswell).


metallica48423

Quote from: timned88 on February 14, 2009, 01:43:05 PM
i clicked through the link you provided but 3035 is not listed in the list of issues.

It's in there.  It is currently marked as "private"
Justin O'Leary
Ex-Project Manager
Ex-Lead Support Specialist

QuoteMicrosoft wants us to "Imagine life without walls"...
I say, "If there are no walls, who needs Windows?"


Useful Links:
Online Manual!
How to Help us Help you   
Search
Settings Repair Tool
     

timned88

oh, ok. hopefully this can get resolved quickly.
is there a particular line in the Css files that I should be looking for?
I don't mean to be a pest but this is a crippler for a photo forum. 

karlbenson


timned88

i think i fixed it!!!!

changed line #497 in display.template.php

ORIGINAL
<div id="msg_', $message['id'], '_footer" class="attachments smalltext">';


MODIFIED
<div class="post floatleft" id="msg_', $message['id'], '_footer" class="attachments smalltext">';

SEEMS to be working properly line.  tested in IE7, FF3, Safari for windows.  More later if necessary.

DerEineDa

I came up with almost the same solution, but with only editing a CSS-file:

/Themes/default/css/forum.css, Line 353:

.attachments
{
clear: right;
padding-top: 1em;
}


Change this to:

.attachments
{
clear: right;
float: left;
width: 100%;
padding-top: 1em;
}


This is pretty dirty, but the nesting of boxes and the abuse of floats are already horrible in this theme (at least since this release) :)

timned88

boy i wish you would have posted this last nite!  ;)
this has been making me crazy trying to figure out.
i will try your solution as well.  should give equal results but i would rather modify css than basecode.
i agree- i had a helluva time with trying to figure out the div's and other things.

timned88

Quote from: DerEineDa on February 14, 2009, 11:06:42 PM
I came up with almost the same solution, but with only editing a CSS-file:

/Themes/default/css/forum.css, Line 353:

.attachments
{
clear: right;
padding-top: 1em;
}


Change this to:

.attachments
{
clear: right;
float: left;
width: 100%;
padding-top: 1em;
}


This is pretty dirty, but the nesting of boxes and the abuse of floats are already horrible in this theme (at least since this release) :)


btw, your solution did not work for me.

DerEineDa

February 14, 2009, 11:28:24 PM #17 Last Edit: February 14, 2009, 11:31:37 PM by DerEineDa
I am absolutely positive that this works. It does here and I didn't do any other changes. Please try to clear your cache.

Btw, the culprit here seems to be the modify button, which floats to the right of each post - but only if you are mod or admin. Because the attachment-area tries to do a "clear: right;", which depends on this button, this results in this behaviour. This was pretty easy to figure out with firebug. But finding a good solution was harder.

There are other bad dependencies like this. For example, there are situations where there are no buttons to the top right of a post (right of the title). This happens if a thread is read-only and you are not a mod or member. If all these buttons are missing, the horizontal divider-line between the post-time and the post-text is positioned too high (it sticks right under the post-time, without the little gap that should be there). This is because the height of this "postingbuttons"-area (this is the name of the css-class) depends of the size of these buttons at the top right. If these are not present, then the divider is too high. This is only one example.

edit: Just to make sure I tried again: I replaced all theme-files with the originals from a fresh download. Then I did the css-edit above and it works again... I am sure it works.

timned88

ok thanks for the explanation.  I was messing with web developer in firefox and could not figure it out until I went into the code and started digging around, based on regular's linked post from up above. I will try your solution again.

timned88

February 15, 2009, 09:29:50 AM #19 Last Edit: February 15, 2009, 09:48:24 AM by timned88
you are correct...  it did work on my testing forum.  might have been a cache issue on my production forum.  i will try again later.

btw, some of my images now have scrollbars inside of the frame.  any idea why that is happening?  it never used to happen.  it started before i made the code change to render the attachments properly...   it is an admin setting that i goofed on and can't remember?  it doesn't do it on my testing forum.

note:  firefox does not exhibit this behavior but IE and safari do.

Advertisement: