Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » weird characters in cms

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

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

Page: 1 2
Go to End
Author Topic: 14777 Views
  • Sam
    Avatar
    Administrator
    679 Posts

    Re: weird characters in cms Link to this post

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

  • Arm
    Avatar
    Community Member
    12 Posts

    Re: weird characters in cms Link to this post

    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!

  • Arm
    Avatar
    Community Member
    12 Posts

    Re: weird characters in cms Link to this post

    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.

  • Arm
    Avatar
    Community Member
    12 Posts

    Re: weird characters in cms Link to this post

    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
    ^

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: weird characters in cms Link to this post

    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:

    http://open.silverstripe.com/ticket/2529

    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.

  • Hamish
    Avatar
    Community Member
    712 Posts

    Re: weird characters in cms Link to this post

    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.

    14777 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.