IE6 crashes on Zend_Dojo

classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

IE6 crashes on Zend_Dojo

Ralf Eggert
Hi,

I encoutered a problem when using Zend_Dojo on a IE6 browser. I have no
idea if this problem is reproducable, but I would like to show my
solution an ask a question.

When using

  $this->dojo()->addStyleSheetModule('dijit.themes.tundra');

in a page, the following code is added:

  <style type="text/css">
  <!--
      @import "/js/dijit/themes/tundra/tundra.css";
  -->
  </style>

This crashes the IE6 on my page for 100%.

Now when I remove the addStyleSheetModule() call with the following

  $this->headLink()->prependStylesheet(
     '/js/dijit/themes/tundra/tundra.css', 'screen, print'
  );

the IE6 does not crash any more. In the page, the following code is added:

  <link href="/js/dijit/themes/tundra/tundra.css" media="screen, print"
        rel="stylesheet" type="text/css" >

The solution works fine for me, but I do have a question. Why is the
dojo css file added in a different way? Why is not headLink() used
internally? Are there any reasons why @import is favoured?

Best regards,

Ralf
Reply | Threaded
Open this post in threaded view
|

Re: IE6 crashes on Zend_Dojo

till
Hey Ralf,

On Thu, Feb 4, 2010 at 3:21 PM, Ralf Eggert <[hidden email]> wrote:

> Hi,
>
> I encoutered a problem when using Zend_Dojo on a IE6 browser. I have no
> idea if this problem is reproducable, but I would like to show my
> solution an ask a question.
>
> When using
>
>  $this->dojo()->addStyleSheetModule('dijit.themes.tundra');
>
> in a page, the following code is added:
>
>  <style type="text/css">
>  <!--
>      @import "/js/dijit/themes/tundra/tundra.css";
>  -->
>  </style>
>
> This crashes the IE6 on my page for 100%.
>
> Now when I remove the addStyleSheetModule() call with the following
>
>  $this->headLink()->prependStylesheet(
>     '/js/dijit/themes/tundra/tundra.css', 'screen, print'
>  );
>
> the IE6 does not crash any more. In the page, the following code is added:
>
>  <link href="/js/dijit/themes/tundra/tundra.css" media="screen, print"
>        rel="stylesheet" type="text/css" >
>
> The solution works fine for me, but I do have a question. Why is the
> dojo css file added in a different way? Why is not headLink() used
> internally? Are there any reasons why @import is favoured?
>
> Best regards,
>
> Ralf
>

From a standards perspective there is no difference between linking
and importing. At least at that level. At that level means, it seems
to be in the html anyway, and not within another stylesheet.

Sometimes people use @import to hide css from older browsers, e.g.
@import('foobar') screen; should hide code from IE6 (if I remember
correctly) and a bunch of other browsers, but otherwise, there's no
difference at this "level" -- the other use case for @import is to
import styles into another stylesheet, but that doesn't seem to be the
case here.

Anyway, haven't heard of such a bug, and I feel your pain in regard to
supporting older browsers. :) Did you test this on a Windows with IE6,
or using one of these multi-ie-tools? Sometimes the tools crash for
other reasons, but you probably made sure that this is the real deal.

Till
Reply | Threaded
Open this post in threaded view
|

Re: IE6 crashes on Zend_Dojo

Ralf Eggert
Hi Till,

> From a standards perspective there is no difference between linking
> and importing. At least at that level. At that level means, it seems
> to be in the html anyway, and not within another stylesheet.
>
> Sometimes people use @import to hide css from older browsers, e.g.
> @import('foobar') screen; should hide code from IE6 (if I remember
> correctly) and a bunch of other browsers, but otherwise, there's no
> difference at this "level" -- the other use case for @import is to
> import styles into another stylesheet, but that doesn't seem to be the
> case here.
>
> Anyway, haven't heard of such a bug, and I feel your pain in regard to
> supporting older browsers. :) Did you test this on a Windows with IE6,
> or using one of these multi-ie-tools? Sometimes the tools crash for
> other reasons, but you probably made sure that this is the real deal.

Thanks for your comments so far. Yes I used the IETester on Win XP as
well as a MultipleIEs installer. In both IE6 versions the problem occurs
with @import and not if the css is added with the link-tag.

I have no idea if this problem also occurs on a "native" IE6
installation. In the target audience for this special website the IE6 is
still used by more than 30% of the users so the IE6 still needs to be
supported.

Thanks and best regards,

Ralf
Reply | Threaded
Open this post in threaded view
|

Re: IE6 crashes on Zend_Dojo

till
On Thu, Feb 4, 2010 at 3:47 PM, Ralf Eggert <[hidden email]> wrote:

> Hi Till,
>
>> From a standards perspective there is no difference between linking
>> and importing. At least at that level. At that level means, it seems
>> to be in the html anyway, and not within another stylesheet.
>>
>> Sometimes people use @import to hide css from older browsers, e.g.
>> @import('foobar') screen; should hide code from IE6 (if I remember
>> correctly) and a bunch of other browsers, but otherwise, there's no
>> difference at this "level" -- the other use case for @import is to
>> import styles into another stylesheet, but that doesn't seem to be the
>> case here.
>>
>> Anyway, haven't heard of such a bug, and I feel your pain in regard to
>> supporting older browsers. :) Did you test this on a Windows with IE6,
>> or using one of these multi-ie-tools? Sometimes the tools crash for
>> other reasons, but you probably made sure that this is the real deal.
>
> Thanks for your comments so far. Yes I used the IETester on Win XP as
> well as a MultipleIEs installer. In both IE6 versions the problem occurs
> with @import and not if the css is added with the link-tag.
>
> I have no idea if this problem also occurs on a "native" IE6
> installation. In the target audience for this special website the IE6 is
> still used by more than 30% of the users so the IE6 still needs to be
> supported.
>
> Thanks and best regards,
>
> Ralf
>

I'd advice to built a clean VM with IE6. I use those tools as well,
but I also found they crash unexpectedly sometimes. And it's not
always because the IE engine would.

Also, thinking about your code and my response. Maybe Dojo is trying
to hide code from IE6 using this method? If so, then a "screen" would
be missing, imho. Maybe you can patch that and let us know if it
helped.

Till
Reply | Threaded
Open this post in threaded view
|

Re: IE6 crashes on Zend_Dojo

Ralf Eggert
Hi Till,

> I'd advice to built a clean VM with IE6. I use those tools as well,
> but I also found they crash unexpectedly sometimes. And it's not
> always because the IE engine would.

Ok, setting up a clean VM is another field I need to work at. If I find
the time, I will try it. But until then I need to stick to the tools
that are available here. ;-(

> Also, thinking about your code and my response. Maybe Dojo is trying
> to hide code from IE6 using this method? If so, then a "screen" would
> be missing, imho. Maybe you can patch that and let us know if it
> helped.

Well in the manual <http://docs.dojocampus.org/dijit-themes> the
inclusion of the css theme is explained with the link-tag.

<link rel="stylesheet" href="dojo/dijit/themes/tundra/tundra.css" />

I am not an expert but it would make much sense to hide the css from the
IE6 since Dojo without any styles looks a bit strange. So I am not sure
if the Dojo guys really want to hide anything from IE6 at this point.

Thanks,

Ralf

Reply | Threaded
Open this post in threaded view
|

Re: IE6 crashes on Zend_Dojo

drm-4
In reply to this post by Ralf Eggert
Ralf Eggert wrote:
> I have no idea if this problem also occurs on a "native" IE6
> installation. In the target audience for this special website the IE6 is
> still used by more than 30% of the users so the IE6 still needs to be
> supported.
I'd also suggest using a virtual machine with a native Windows XP + IE6.
I have had crashes and rendering issues with MultipleIE's, while a
native one worked like a charm. Try virtualbox (Sun, see
virtualbox.org), which you can use free of charge on any typical host
computer (I've used it successfully on WinXP and Linux hosts).

You do not need the open source edition or compile it yourself, as long
as you're using it for personal use (which can be commercial use as
well, as long as you're the only user connecting to the virtual machine
from your host machine, read the PUEL if in doubt).

HTH
Gerard