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
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
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
Add:
SSViewer::set_source_file_comments(false);
to mysite/_config.php or disable dev mode.
Thanks a lot!
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
Are you flushing your template cache by adding ?flush=all to the end of the URL?
ah! I was so irritated about those comments i forgot to flush ;-) No comments any more ;-)
thanks!
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.
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