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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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

Home Page Problem

Go to End

2 Posts   2342 Views


Community Member, 15 Posts

15 May 2009 at 11:14pm

Edited: 15/05/2009 11:16pm

I have SilverStripe installed locally with WAMP. When I try to access http://localhost/silverstripe/ I get the following:

[Notice] Undefined index: ID
GET /silverstripe

Line 43 in C:\wamp\www\silverstripe\sapphire\core\control\ModelAsController.php

34 			$SQL_URLSegment = Convert::raw2sql($this->urlParams['URLSegment']);
35 			$child = SiteTree::get_by_url($SQL_URLSegment);
37 			if(!$child) {
38 				if($child = $this->findOldPage($SQL_URLSegment)) {
39 					$url = Controller::join_links(
40 						Director::baseURL(),
41 						$child->URLSegment,
42 						$this->urlParams['Action'],
43 						$this->urlParams['ID'],
44 						$this->urlParams['OtherID']
45 					);
47 					$response = new HTTPResponse();
48 					$response->redirect($url, 301);
49 					return $response;


    * ModelAsController->getNestedController()
      Line 16 of ModelAsController.php
    * ModelAsController->handleRequest(HTTPRequest)
      Line 27 of RootURLController.php
    * RootURLController->handleRequest(HTTPRequest)
      Line 262 of Director.php
    * Director::handleRequest(HTTPRequest,Session)
      Line 106 of Director.php
    * Director::direct(/)
      Line 115 of main.php

I then run http://localhost/silverstripe/db/build?flush=1 and in Creating database records I get a line

Home page created

I then run http://localhost/silverstripe/?flush=1 and the home page appears with the introduction text that appears when one has just installed SilverStripe. There is also the "proper" home page that I'd created earlier. Both are in the menu.

So I then change the new home page text and Page Type to Home Page and then delete the Home page I created originally.

I then run http://localhost/silverstripe/?flush=1 and the Home Page is OK and menu is correct.

The Page name for this Home Page is, naturally, Home. I change it to the companies name and Save and Publish.

When I refresh the Home page I get the error code again. and then I can go throught the whole process again :o(

The original home page was working without problems for weeks before this suddenly happened.

Can anyone help?


Community Member, 15 Posts

15 May 2009 at 11:32pm

Edited: 17/05/2009 10:25pm

I've done a workaround by not including the "new" home page in the menus and changing it to a Redirect page that loads the "proper" home page.

I'd still like to find out what the problem is.

Edit: I think it's because I also changed the Navigation label as well as the Page name. Seems like there has to be a Home page.