Possible timing issue with G3

griffinmt
griffinmt's picture

Joined: 2009-09-06
Posts: 128
Posted: Mon, 2009-10-26 01:17

First, I am running at the exp level as of Saturday 24/09

Using Chrome and Firefox, and after making a change to screen.css, the initial album photos don't load up for display (the g-view area is empty).
If I click the menu Home tab after that, it all loads up correctly. This is a consistent type of behaviour. If nested down into albums and looking at a page of thumbnail photos, then make a minor change to screen.css, and hit the refresh (F5) key, the same behaviour is seen.

This does not occur with IE8.

Do Chrome and Firefox proceed with the tag processing in <body> before <link>'s are completed??

Martyn T. Griffin

Login or register to post comments
griffinmt
griffinmt's picture

Joined: 2009-09-06
Posts: 128
Posted: Mon, 2009-10-26 19:33

I think I have (almost) found out the strange behaviour
The following is what I recently added to the top of page.html.php

Quote:
<?php defined("SYSPATH") or die("No direct script access.") ?>
<?php// include_once("enhanced_css.php"); ?>
<?php// $css = new EnhancedCss("themes/Family/css/screen"); ?>

Note that lines two and three are commented out. In this mode everything works as expected. But as soon as I uncomment line two, a strange thing happens to the resulting html output which I can't understand. It seems that all the generated output after the <title> (<link>, <script> etc.) are actually appearing AFTER the <body>.
That probably explains why IE8 seems to work - bad error handling perhaps.
The included module is just a simple class definition (attached below). How could this be???

Martyn T. Griffin

AttachmentSize
enhanced_css.php_.txt2.96 KB
Login or register to post comments
nivekiam
nivekiam's picture

Joined: 2002-12-10
Posts: 10953
Posted: Mon, 2009-10-26 20:26

I'm not a programmer, but it looks to me like you're trying to insert CSS before even the doctype and <html> tag are generated.
____________________________________________
Like Gallery? Like the support? Donate now!!! See G2 live here

Login or register to post comments
griffinmt
griffinmt's picture

Joined: 2009-09-06
Posts: 128
Posted: Mon, 2009-10-26 21:56

Not really.
The two lines of code at the top include the code to define the class and then to invoke it.
When it is invoked, it checks to see if either of the two control files are newer than the screen.css, and if either is newer, they are used to recreate the screen.css file. No page output is generated by this.
All this happens before the rest of the page is processed.
Martyn T. Griffin

Login or register to post comments
griffinmt
griffinmt's picture

Joined: 2009-09-06
Posts: 128
Posted: Mon, 2009-10-26 22:47

This is the difference in the outputs, with and without the inclusion of the class. The info is taken from firebug.

Martyn T. Griffin

AttachmentSize
withoutclassloaded.jpg29.04 KB
withclassloaded.jpg30.42 KB
Login or register to post comments