17691 Posts in 4607 Topics by 2180 members
General Questions
SilverStripe Forums » General Questions » Home Page Problem
General questions about getting started with SilverStripe that don't fit in any of the categories above.
Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba
|
Page:
1
|
Go to End | |
| Author | Topic: | 1334 Views |
-
Home Page Problem

15 May 2009 at 11:14pm Last edited: 15 May 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 /silverstripeLine 43 in C:\wamp\www\silverstripe\sapphire\core\control\ModelAsController.php
Source34 $SQL_URLSegment = Convert::raw2sql($this->urlParams['URLSegment']);
35 $child = SiteTree::get_by_url($SQL_URLSegment);
36
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 );
46
47 $response = new HTTPResponse();
48 $response->redirect($url, 301);
49 return $response;Trace
* 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.phpI 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?
-
Re: Home Page Problem

15 May 2009 at 11:32pm Last edited: 17 May 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.
| 1334 Views | ||
|
Page:
1
|
Go to Top |

