Jump to:

23368 Posts in 18143 Topics by 2863 members

General Questions

SilverStripe Forums » General Questions » debugging why a page wont "save & publish"

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

Page: 1 2
Go to End
Author Topic: 969 Views
  • vwd
    Community Member
    158 Posts

    Re: debugging why a page wont "save & publish" Link to this post

    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.

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.