Jump to:

22994 Posts in 11843 Topics by 2828 members

General Questions

SilverStripe Forums » General Questions » Site won't open in IE6

General questions about getting started with SilverStripe that don't fit in any of the categories above.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1864 Views
  • tmray
    Avatar
    Community Member
    7 Posts

    Site won't open in IE6 Link to this post

    I just finished a site on a dev address and it works in every browser except IE6. When you go to the site in IE6 it just shows an error message "Internet Explorer can not open the Internet site. Operation aborted". This includes the sub-pages and even the cms admin.

    Any idea what might be causing this.

    Thanks.
    Tom

  • banal
    Avatar
    Community Member
    901 Posts

    Re: Site won't open in IE6 Link to this post

    Hi Tom

    I had the same issue once when I tried to dynamically load a stylesheet using javascript (by appending some nodes to the head element of the DOM). Are you doing something similar by any change? Or a document.write in the <head>?

  • tmray
    Avatar
    Community Member
    7 Posts

    Re: Site won't open in IE6 Link to this post

    Nope. Only thing I had done was creating custom layouts based on how its done in the online tutorials. And the css was just changes in the pre-existing ones it was already using.

  • Hammy
    Avatar
    Community Member
    49 Posts

    Re: Site won't open in IE6 Link to this post

    I'm experiencing the exact same issue.

    Do you have the base_tag in your templates?

    <% base_tag %>

    I've removed this and it seems to fix the problem. The way base writes itself is as follows

    <base href="http://www.yourdomain.com" >

    From the research that I have done - it appears that ie6 doesn't quite understand a self closing base element and it needs to be written like:

    <base href="http://www.yourdomain.com/"></base>

    Since the base_tag is apparently essential (as described here: http://doc.silverstripe.org/doku.php?id=html#its_all_in_the_head ) I'm currently looking at how to to fix this.

  • Hammy
    Avatar
    Community Member
    49 Posts

    Re: Site won't open in IE6 Link to this post

    You could update the file "\sapphire\core\SSViewer.php" and replace:

    $content = ereg_replace('<' . '% +base_tag +%' . '>', '<base href="<?= Director::absoluteBaseURL(); ?>" >', $content);

    with:

    $content = ereg_replace('<' . '% +base_tag +%' . '>', '<base href="<?= Director::absoluteBaseURL(); ?>"></base>', $content);

    But this is hacking into the Sapphire framework and if you wish to update in the future (and if this bug has not been addressed) you could have the same issue again (ie overwrite the fix).

    Does anyone know how we can overwrite the base_tag without going into the Sapphire files?

  • wupa
    Avatar
    Community Member
    1 Post

    Re: Site won't open in IE6 Link to this post

    How about putting this into the template?

    <% base_tag %></base>

  • Mo
    Avatar
    Community Member
    485 Posts

    Re: Site won't open in IE6 Link to this post

    Using <% base_tag %></base> wont work, as you will be be closing a self closing tag. You could try <base href="$BaseHref" ></base>.

    I am not convinced you are solving the source of this issue with this fix however. I am running a lot of Silverstripe sites with the default <base /> tag and have no problems with IE6.

    Of course the lowest rungs of hell are reserved for Internet Explorer 6, but its support for self closing tags in HTML seems fairly similar to other browsers. I have found it seems to have absolutely no support for self closing tags in XML. Is it possible you are somehow making IE think you are viewing XML? Maybe an incorrect Doctype or <? xml ?> tag at the begining of your document?

    Just a thought, hope its of some help.

    Cheers,

    Mo

    1864 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.