Jump to:

23478 Posts in 18941 Topics by 2878 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, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1804 Views
  • Varberg
    Community Member
    15 Posts

    Home Page Problem Link to this post

    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?

  • Varberg
    Community Member
    15 Posts

    Re: Home Page Problem Link to this post

    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.

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.