3

I am amazed by seeing the below behaviour in SDL Tridion 2011 SP1 with HR1:

I have a Page with all statically embedded component presentation on it. In the Page Template DWT, I have following lines of code:

...
...
<!--[if lt IE 9]>
   <link href="/system/css/ie8.css" rel="stylesheet" type="text/css"/>
   <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
<![endif]-->
<!--[if IE 9]>
    <link href="/system/css/ie9.css" rel="stylesheet" type="text/css"/>
<![endif]-->
...
...

If I see the Preview of the page in CME, it looks perfectly fine and as expected.

If I published the page to the file system and check the component presentation of the page in the transport package, it is also perfectly fine and as expected.

However, then if I go to the file system location, where the page has been published, the source of the page looks as below:

    ...
    ...
    <!--[if lt IE 9]>
       <link href="/system/css/ie8.css" rel="stylesheet" type="text/css"/>
       <script src="http://html5shim.googlecode.com/svn/trunk/html5.js"></script>
    <![endif]-->    
    !--[if IE 9]>
    <link href="/system/css/ie9.css" rel="stylesheet" type="text/css"/>
    <![endif]-->
    ...
    ...

Please note the line - [if IE 9] - The delimiter < is removed.

I have checked the Content Delivery side, and there is no customization and everything is working with default settings.

Interestingly, if I put a new line between -

    <![endif]-->
    <!--[if IE 9]>

To write it like as below:

    <![endif]-->

    <!--[if IE 9]>

It starts working fine.

[Updated] I observed another thing- The same thing is working fine Dev, Test and UAT but is giving problem in the Production Environment only. Even on Production, it was working fine few weeks ago, but now we have re-published it and seeing this behaviour.

My concern is related to the Behaviour - My Understanding was whatever is there in the Rendered CP in Transport package comes out to be the final page output; but I am seeing an exception here

Any idea about this behaviour?

3
  • Tried on .NET and Java deployers, I see the expected output on the pages...
    – Nuno Linhares
    Commented Apr 10, 2013 at 8:29
  • Is the template and DWT checked in? Commented Apr 10, 2013 at 9:06
  • Yes They are checked in...I observed another thing- The same thing is working fine Dev, Test and UAT but is giving problem in the Production Environment only. Even on Production, it was working fine few weeks ago, but now we have re-published it and seeing this behaviour. My concern is related to the Behaviour - My Understanding was whatever is there in the Rendered CP in Transport package comes out to be the final page output; but I am seeing an exception here Commented Apr 10, 2013 at 9:18

2 Answers 2

2

I'm using the following in my Page Template (DWT TBB actually):

<!DOCTYPE html>
<!--[if lt IE 7 ]><html class="ie ie6" lang="en"> <![endif]-->
<!--[if IE 7 ]><html class="ie ie7" lang="en"> <![endif]-->
<!--[if IE 8 ]><html class="ie ie8" lang="en"> <![endif]-->
<!--[if (gte IE 9)|!(IE)]><!--><html lang="en"> <!--<![endif]-->
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
  <title>Default</title>
  <meta charset="utf-8" />
  <meta name="description" content="Basic Html5 Template" />
  <meta name="keywords" content="key, words" /> 
  <link href="/Images/favicon.ico"  rel="shortcut icon" />    
  <link rel="stylesheet" type="text/css" href="/css/style.css" />       
  <!--[if lt IE 8]>
    <div style=' clear: both; text-align:center; position: relative;'>
      <a href="http://windows.microsoft.com/en-US/internet-explorer/products/ie/home?ocid=ie6_countdown_bannercode"><img src="http://storage.ie6countdown.com/assets/100/images/banners/warning_bar_0000_us.jpg" border="0" height="42" width="820" alt="You are using an outdated browser. For a faster, safer browsing experience, upgrade for free today." /></a>
    </div>
  <![endif]-->
  <!--[if lt IE 9]>
    <script type="text/javascript" src="/js/html5.js"></script>
    <link rel="stylesheet" type="text/css" media="screen" href="/css/ie.css" />
  <![endif]-->
</head>

And that outputs exactly as shown. Now this is a 2013 installation, so that might be different, and my <!--[if lt IE 9]> is indented by a tab (although the one at the top isn't, but that one is a one liner).

Might be interesting to check out a few options and see if they all come out the same (broken) way? So with indentation (tabs or spaces), one line statements etc.

It could be there is a defect there as it certainly isn't expected behavior to strip out characters. If you have reproducible steps, I would suggest reporting them to SDL tridion Customer Support.

1
  • Providing indentation, spaces or line breaks as I have mentioned in my question, works all fine. I just want to know if it is in as defined format as in the question and if the Preview in CME and component presentation in transport package is as expected; what are the possibilities/area that it got changed in the presentation server at the file system? Just wanted to confirm if there is any such provision possible in SDL Tridion. Commented Apr 10, 2013 at 8:44
2

Figured it out.

The issue is related to issue with Chrome Browser.

I was looking at the Code in Chrome Browser and chrome (as it does in View Source functionality) truncates the < character anonymously. I tried it with FireFox, and it seems working fine.

Reported the issue with Google that persists even with the latest update on Chrome Browser.

2
  • so you didn't really check the source of the file, but checked the source in the browser?
    – John Bax
    Commented Apr 10, 2013 at 12:05
  • It is actually the Source Code File in Text format being opened on Chrome Browser and not the loaded page. As logging on Production Server is restricted so we can not see the file in it. What I just mentioned, we were receiving this issue even is View Source when we load the page along with if we simply take file in text format and opened it up in the browser. Commented Apr 10, 2013 at 12:12

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.