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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

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

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

debugging why a page wont "save & publish"


Go to End


9 Posts   1960 Views

Avatar
vwd

Community Member, 166 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 docs on Debugging. 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