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

strange PHP code outputted at the top of all of the pages

Go to End

3 Posts   1865 Views


Community Member, 4 Posts

22 January 2008 at 11:17am

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()); } } } ?>


Community Member, 501 Posts

22 January 2008 at 11:58am

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?


Community Member, 4 Posts

22 January 2008 at 12:21pm'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.