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

unbreaking a silverstripe install


Go to End


3 Posts   1328 Views

Avatar
Wintermute

Community Member, 1 Post

21 May 2011 at 2:49am

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?"

Avatar
digibrains

Community Member, 130 Posts

21 May 2011 at 4:05am

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

Avatar
swaiba

Forum Moderator, 1899 Posts

21 May 2011 at 5:45am