1053 Posts in 383 Topics by 376 members
| Go to End | Next > | |
| Author | Topic: | 2860 Views |
-
#2.3rc3 generating html comments...

11 February 2009 at 9:56pm
Hi,
after upgrading to #rc3 I got a lot of those html comments within the source...
<!-- include ... --> <!-- end include -->
<!-- template ... --><!-- end template -->How to remove this?
thanks much!
patte -
Re: #2.3rc3 generating html comments...

11 February 2009 at 10:02pm Last edited: 11 February 2009 10:03pm
Add:
to mysite/_config.php or disable dev mode.SSViewer::set_source_file_comments(false);
-
Re: #2.3rc3 generating html comments...

11 February 2009 at 10:13pm
Hm.. I tried to use SSViewer::set_source_file_comments(false); with no success. I also commented out
Director::set_dev_servers(array(
'localhost',
'127.0.0.1',
));but those comments still resists. Any idea?
Thanks
Patte
-
Re: #2.3rc3 generating html comments...

11 February 2009 at 10:15pm
Are you flushing your template cache by adding ?flush=all to the end of the URL?
-
Re: #2.3rc3 generating html comments...

11 February 2009 at 10:17pm
ah! I was so irritated about those comments i forgot to flush ;-) No comments any more ;-)
thanks!
-
Re: #2.3rc3 generating html comments...

10 March 2009 at 10:56pm
Aaaaaaah! Finally!!
It has just cost me 5 hours to see why a sliced html page (XHTML 1.1) implemented in SS templates went horribly wrong in IE and fine in Firefox. I couldn't find anything wrong in the html, couldn't see a difference in the css (html exactly identical to ss templates), I went through css and html line-by-line.... and yet divs were all over the place in ie....
It took a long long while before I figured out these comments were there and needed to turn off. Comments cannot be placed before the DOCTYPE declaration in HTML because it makes IE go into quirksmode and everything may go awry, see http://www.google.nl/search?q=html+placing+comments+before+doctype
Please, this "feature" really needs to be turned off by default in future releases, because this causes very unexpected behaviour.
-
Re: #2.3rc3 generating html comments...

15 March 2009 at 7:32am
Sorry this caused you so much debugging grief... I've opened a ticket asking for opinions about turning this "feature" off by default: http://open.silverstripe.com/ticket/3726
| 2860 Views | ||
| Go to Top | Next > |


