Jump to:

22975 Posts in 11620 Topics by 2826 members

General Questions

SilverStripe Forums » General Questions » unbreaking a silverstripe install

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
Go to End
Author Topic: 861 Views
  • Wintermute
    Avatar
    Community Member
    1 Post

    unbreaking a silverstripe install Link to this post

    I'm trying to get to grips with SS, and have built the stuff in the first couple of tutorials (the basic site one and the 'extending' one), and read through the further topic articles.

    Fine, all good. I'm feeling confident. Let's have a go at building stuff myself from scratch. We need a new intranet, so lets have a go at creating a 'Client' page type, with some child 'Project' page types.

    OK, that went well. I can add a new Client page in the CMS and I can see the "Add a Project" link in the complextablefield thing in the Client's "Project" tab. But my custom fields for a Project aren't showing up in the popup window; it's just showing the default "Page" fields. Ummm... let's try changing the Project class so it extends DataObject rather than Page. I seem to remember that in a tutorial somewhere... ok, now go /dev/build/ again.... oooh, it's doing stuff....

    Well, that didn't work. Now any page I try to get to in the CMS is giving me a, "Sorry, there was a problem with handling your request" error. Quick, change it back.

    Oh. It's broken. Changing it back doesn't do anything. I now have a broken SS install and no way of unbreaking it.

    So...

    Given my evident lack of comprehension here, it's clear that this is something I'm likely to be doing depressingly often as I figure out how this thing works. My question, therefore, is not "how do I add custom fields to a page in a popup box-thing", but:

    "once you've screwed the code up enough that you can't even load the CMS, what are the minimum steps - short of wiping the database, deleting every file and reinstalling the blasted thing - to get back to a still-not-working-right-but-at-least-working-somehow installation?"

  • prawnstar
    Avatar
    Community Member
    116 Posts

    Re: unbreaking a silverstripe install Link to this post

    As Douglas Adams might suggest, don't panic.

    First thing. Let's throw your site into dev mode.

    Add this to your /mysite/_config.php

    Director::set_environment_type("dev");

    Now view your site and see if you are getting an error. Will probably be a light blue screen with red and black text.

    That should at least point you to the offending code.

    C.b

    P.S. Bookmark these pages (you'll eventually need them):
    http://www.ssbits.com/
    http://www.leftandmain.com

  • swaiba
    Avatar
    Forum Moderator
    1769 Posts
    861 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.