View Issue Details

IDProjectCategoryView StatusLast Update
0016934phplist application(No Category)public06-01-14 20:27
Reporterduncanc 
PrioritynormalSeverityminorReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version3.0.5 
Target Version3.0.XFixed in Version3.0.6 
Summary0016934: On some sites the page header is pushed-up
DescriptionI was puzzled after installing phplist on several sites by some having the page header pushed up beyond the top of the page. The problem appears on the login page, and also after logging-in.

see this site for a 'good' layout http://www.ealingcivicsociety.org/lists/admin/
and this one for a 'bad' layout http://www.ffdivalist.com/viplist/admin/

After comparing the html source of a good page with a bad page I found a couple of related issues

1) the files admin/ui/dressprow/header.inc and header_minified.inc both have a non-displayable character at the beginning of the file immediately before "<link". The effect of this seems to be to push the header down.

In the 3.0.5 distribution zip file the file admin/ui/dressprow/header.inc is 1819 bytes. But viewing the file in a text editor, the length is only 1816 bytes.
The extra 3 bytes seem to be the UTF-8 representation of a unicode byte order mark, suggesting that the file has been saved in different formats and been corrupted.
After renaming the file and copying its content into a new file, so that the length is 1816 bytes, the page header was moved up to be similar to a 'bad' page.

Similarly for the header_minified.inc file.

2) The header is moved up due to a css rule for the container div
margin-top: -10px;

I am guessing that the css rule is present to compensate for the header being moved down by the non-displayable character.
I tried disabling that rule but that doesn't quite have the right effect.

I couldn't see why some sites display correctly and others do not. I guess it is to do with the php configuration, possibly to do with unicode, so that some ignore the non displayable character. So, for a 'bad' site, the non displayable character is not sent to the browser, and the css rule then moves the header past the top of the page.
TagsNo tags attached.

Activities

support

29-10-13 20:30

administrator   ~0052374


strange one. I can't find the character and header.inc is 1910 bytes on my system.

ah, header_minified.inc is 1,819 bytes, so maybe you meant that file.

maybe a "dos2unix" will solve it.

michiel

29-10-13 20:44

manager   ~0052376

Reminder sent to: mariez

mariez, do you have any idea on this one?

mariez

29-10-13 21:26

developer   ~0052378

Last edited: 29-10-13 21:27

View 2 revisions

Yes Michiel, i see what duncanc is saying.
 header.inc and header_minified.inc are in UTF-8, with BOM.
We should:
1- change both files to UTF-8 (no BOM),
and
2- replace the style #container {margin-top:-10px} for #container {margin-top:10px}
That will solve the problem.
If this is ok for you, just asign me this issue.

michiel

29-10-13 21:32

manager   ~0052379


this dreaded BOM :-)

duncanc

30-10-13 09:35

developer   ~0052380

I can confirm that the changes identified fix the problem. Both 'good' and 'bad' sites display correctly.

mariez

30-10-13 19:37

developer   ~0052384

Thanks duncanc!
Change is done.