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?


Reply

4 Posts   3192 Views

Avatar
anselm.dk

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

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

<!-- include /home/www/survivalkit.dk/themes/yuikit/templates/Includes/Navigation.ss -->

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:
define('SS_ENVIRONMENT_TYPE','live');

I also tried setting the live mode like this in my _config.php file:
Director::set_environment_type('live');

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

You can see the live site at http://www.survivalkit.dk

Did anyone have similar issues with 2.3.3?

Avatar
Willr

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);

Avatar
anselm.dk

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:
http://svn.silverstripe.com/open/modules/cms/tags/2.3.3@86153 cms
http://svn.silverstripe.com/open/modules/jsparty/tags/2.3.3@86153 jsparty
http://svn.silverstripe.com/open/modules/sapphire/tags/2.3.3@86153 sapphire

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

Avatar
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: http://open.silverstripe.com/ticket/4582