17488 Posts in 4473 Topics by 1978 members
| Go to End | Next > | |
| Author | Topic: | 3557 Views |
-
Tutorial not working for 2.2.0

1 December 2007 at 12:36pm
Hi there,
i just found silverstripe CMS by surfin through the Google Highly Open Participation Contest website. After installing it on windows xp sp2 / xampp i followed the instructions of the online tutorial. i came up for the "creating a new template" section and created a HomePage.php, the HomePage.ss, flushed the database and the cms cache. without success. i can´t select the HomePage page type from the "new page" dropdown. So now i am quite helpless wondering if this is a bug or if i have done something wrong...
-
Re: Tutorial not working for 2.2.0

2 December 2007 at 4:12am Last edited: 2 December 2007 8:59am
You have probably done something wrong. Watch for typo's (case-sensitivity)..
Make sure to refresh the backend itself too.... (www.site.com/admin/cms?flush=1)
<edit>
Oh, and if you cannot figure it out..Post your code here...
</edit> -
Re: Tutorial not working for 2.2.0

2 December 2007 at 9:31am Last edited: 2 December 2007 9:32am
Hi! Thanks for your Support. I double checked everything but did not found a mistake. For adding a new page i did the following:
1) Created a new PHP File named HomePage.php and saved it at <silverStripeHome>\tutorial\code
Source:
<?php
/**
* Defines the HomePage page type
*/class HomePage extends Page {
static $db = array(
);
static $has_one = array(
);
}class HomePage_Controller extends Page_Controller { }
?>2) Created a new PHP File named HomePage.ss and saved it at <silverStripeHome>\tutorial\templates
Source:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" >
<head>
<% base_tag %>
$MetaTags
<link rel="stylesheet" type="text/css" href="tutorial/css/layout.css" />
<link rel="stylesheet" type="text/css" href="tutorial/css/typography.css" />
<link rel="stylesheet" type="text/css" href="tutorial/css/form.css" />
</head>
<body>
<div id="Main">
<ul id="Menu1">
<% control Menu(1) %>
<li><a href="#">$MenuTitle</a></li>
<% end_control %>
</ul>
<div id="Header">
<h1>$Title</h1>
</div>
<div id="ContentContainer">
<ul id="Menu2">
<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the "{$Title}" page">$MenuTitle</a></li>
<% end_control %>
</ul>
<div id="Content" class="typography">
<div class="breadcrumbs">
$Breadcrumbs
</div>
$Content
$Form
</div>
</div>
<div id="Footer">
<span>Visit <a href="http://www.silverstripe.com" title="Visit www.silverstripe.com">www.silverstripe.com</a> to download the CMS</span>
</div>
</div>
$SilverStripeNavigator
</body>
</html>3) Called http://localhost/silverstripe220/db/build?flush=1
Controlled the result list of the server response. It does not contain a table named HomePage
4) Called http://localhost/silverstripe220/?flush=1
5) Logged into backend and called http://localhost/silverstripe220/admin/?flush=1I am at a loss. Any ideas?
-
Re: Tutorial not working for 2.2.0

2 December 2007 at 9:50am Last edited: 2 December 2007 10:01am
Can you try moving them from tutorial, to mysite and see if that works?
I think db/build doesn't recognise the code inside the tutorial folder. Although clearly it should be.
Seems to work for me. Very strange. Is this a complete clean install of 2.2?
Cheers,
Sean -
Re: Tutorial not working for 2.2.0

2 December 2007 at 10:03am
I worked! But i don´t understand why? the rest of the /mysite folders are empty.
is there a config file where i can check if silverstripe uses the mysite or the tutorials installation?
could this be connected with this error message which i get when i try to "sort sub pages?"
Error in Ajax evaluator on line 974: invalid flag after regular expression
Notice: Undefined index: ID in D:\xampp\xampp\htdocs\silverstripe220\cms\code\LeftAndMain.php on line 671
Systemfehler -
Re: Tutorial not working for 2.2.0

2 December 2007 at 10:08am Last edited: 2 December 2007 10:12am
Is there a _config.php file inside tutorial?
One other thing you could try is removing the template, but leave HomePage.php in the templates/code and see if it works.
Cheers,
Sean -
Re: Tutorial not working for 2.2.0

2 December 2007 at 11:03am
Oh alright, that´s it. the config file was missing in /tutorials i copied the one from /mysite an now the new page works. the ajax error remains.
should i create a new thread for the sub pages sorting ajax error, or is it okay to discuss it here?
-
Re: Tutorial not working for 2.2.0

2 December 2007 at 11:08am
Probably make a new thread. I'm not too sure about your ajax error.
Cheers,
Sean
| 3557 Views | ||
| Go to Top | Next > |



