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.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

debugging why a page wont "save & publish"


Go to End
Reply


9 Posts   1156 Views

Avatar
vwd

Community Member, 160 Posts

1 November 2011 at 2:54pm

I would suggest you turn on on error logging. And if that doesn't yield any interesting info, then it might be worth including debug output statements writing to the log throughout the 2 ::save(...) functions.

It's crude, but sometimes that's the only way to get to in code and see the state of properties, where stepping through code isn't possible (as when you need to replicate it on production server). (It may still be possible, depending on your hosting setup to debug remotely if you can set up XDebug on the PHP install, and the host's firewall will allow you to open up that port etc. But before you go down that path, try debug output statements throughout the code)

Have a look at the [url=http://doc.silverstripe.org/sapphire/en/topics/debugging]docs on Debugging[/url]. Particularly, Debug::show($myVariable) and Debug::message("My message").

Note though you'll have to take care to revert to the original code once you've sorted out the issue.

Go to Top