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.

We've moved the forum!

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.

Template Questions /

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

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


Go to End


4 Posts   4358 Views

Avatar
anselmdk

Community Member, 18 Posts

17 September 2009 at 6:45am

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

Forum Moderator, 5523 Posts

17 September 2009 at 6:36pm

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
anselmdk

Community Member, 18 Posts

17 September 2009 at 7:32pm

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 Condo

Community Member, 29 Posts

29 September 2009 at 9:58am

Edited: 29/09/2009 10:26am

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