Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

Template Questions

template comments shown in html source in live mode in 2.3.3?


4 Posts   3192 Views


17 September 2009 at 6:45am Community Member, 18 Posts

I just noticed that a live site I just put up shows comments in the source code like the one below:

<!-- include /home/www/ -->

I was very happy when those comments were first introduced, but usually they would dissappear in live mode.

I'm defining the live mode in my _ss_environment.php file like this:

I also tried setting the live mode like this in my _config.php file:

Finally I checked by echoing environment type out (echo Director::get_environment_type();), which always shows 'live'.

You can see the live site at

Did anyone have similar issues with 2.3.3?


17 September 2009 at 6:36pm Forum Moderator, 5511 Posts

Try var_dump'ing out SSViewer::get_source_file_comments() to see what that says. You can always disable it by setting SSViewer::set_source_file_comments(false);


17 September 2009 at 7:32pm Community Member, 18 Posts

Hi Willr,
thanks for your reply!
I don't know if it is something special to my current Silverstripe setup, but I am able to set source file comments off with SSViewer::set_source_file_comments(false);
Unfortunately the comments are still shown.

The live environment is definitely set, as my javascript and css files are being combined.

I'm running the following Silverstripe setup: cms jsparty sapphire

It is not a big issue for me if it is only my current setup, but maybe there is a bug somewhere?

Fred C.

29 September 2009 at 9:58am (Last edited: 29 September 2009 10:26am), Community Member, 18 Posts

I am seeing the same problem. This may be a regression in 2.3.3.

Update: it is a regression. I filed this: