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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

Archive /

Our old forums are still available as a read-only archive.

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

weird characters in cms

Go to End

14 Posts   15528 Views


Administrator, 690 Posts

20 June 2008 at 10:44am

Edited: 20/06/2008 12:48pm

The bug is caused by one of the headers sent in the output() method of HTTPResponse.php. If you call echo " ", then it's preventing headers from being sent and therefore fixing your output.

I suspect that it is this line is the culprit:

header("HTTP/1.1 $this->statusCode " . self::$status_codes[$this->statusCode]);

You might want to try changing it to this and seeing if that fixes it instead of the "echo" fix that you made.

if($this->statusCode != 200) header("HTTP/1.1 $this->statusCode " . self::$status_codes[$this->statusCode]);


Community Member, 12 Posts

28 July 2008 at 9:57pm

YES! Finally I have been looking for a fix to this bug for ages. Was causing me major stress. I was convinced it was to do with my apache configuration. I tried two different installations using WAMP and XAMPP but to no effect. I also noticed the issue occurs depending on the length of your HTML code. If I was to remove a few Includes then the whole site would start working again. As soon as it goes over a certain length it would switch the transfer encoding to chunked and those random characters would appear at the top and bottom of the html code and break the entire structure. Thanks for the fix it is much appreciated!


Community Member, 12 Posts

29 July 2008 at 2:30am

Oh one thing - that fix does not work for 404 errors. Instead it adds those random characters back in and breaks the page. I have just commented the entire line out for now so that everything works.


Community Member, 12 Posts

19 August 2008 at 11:19pm

Back Again! Just wanted to mention that this bug occurs on the silverstripes demo. If I click on flickr or gallery module I get:

XML Parsing Error: syntax error
Line Number 1, Column 1:


Community Member, 712 Posts

26 August 2008 at 2:28pm

Bumping this thread again because I'm not sure that the SS guys realise that this is borking their own website. I've attached a screenshot of what looks like for me on the open ticket here:

At two different companies through two different firewalls, the silverstripe website is broken. It is also effecting my site and several sites I've looked at through the showcase.

Note that when I'm not behind a firewall, it looks fine.


Community Member, 712 Posts

29 September 2008 at 9:06am

Bumped again.

Added more info and suggested fix to the ticket. Very similar to other issues reported and fixed in Wordpress and Drupal a year ago. Still not sorted in trunk.

Really hope that someone makes this change soon. looks *really bad* through our squid proxy. No css, broken links, random characters at the top of the page.

Go to Top