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.

Archive /

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

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

weird characters in cms


Reply


14 Posts   14790 Views

Avatar
Sam

Administrator, 685 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]);

Avatar
Arm

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!

Avatar
Arm

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.

Avatar
Arm

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
Location: http://demo.silverstripe.com/flickr/
Line Number 1, Column 1:
3ff6
^

Avatar
Hamish

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 silverstripe.com looks like for me on the open ticket here:

[url]http://open.silverstripe.com/ticket/2529[/url]

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.

Avatar
Hamish

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. Silverstripe.com looks *really bad* through our squid proxy. No css, broken links, random characters at the top of the page.