Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » strange PHP code outputted at the top of all of the pages

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

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

Page: 1
Go to End
Author Topic: 1536 Views
  • erasul
    Avatar
    Community Member
    4 Posts

    strange PHP code outputted at the top of all of the pages Link to this post

    I tried rebuilding and reinstalling SilverStripe...and I get this strange PHP code at the beginning of the pages. Any ideas?

    e'); $page->flushCache(); $page = DataObject::get_by_id("SiteTree", $SQL_id); $page->Status = "Unpublished"; Director::redirect($this->getParent()->Link()); } } } ?>

    http://nordicen.bim.undp.org/

  • dio5
    Avatar
    Community Member
    501 Posts

    Re: strange PHP code outputted at the top of all of the pages Link to this post

    Weird, how did you rebuild and reinstall?

    I tried searching in the sourcecode for the piece of code that is being displayed, it looks a bit like it's part of the unpublish() method showing through from cms/code/CMSMain.php (lines 714 - 718), but a bit different.

    What version of SS are you running?

    Are you sure nothing went wrong? Maybe missing pieces during upload? Tried flushing?
    Or it might be some custom code with an error in it?

  • erasul
    Avatar
    Community Member
    4 Posts

    Re: strange PHP code outputted at the top of all of the pages Link to this post

    Umm..it's some weird PHP code that I copied and pasted into the Blog Entry controller that was breaking everything. After I did a simple find in the code, I found out what was causing it.

    Thanks for your help.

    1536 Views
Page: 1
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.