1340 Posts in 432 Topics by 511 members
Page: 1 2
|Go to End||Next >|
12 May 2010 at 1:41pm Last edited: 12 May 2010 1:42pm
I am trying to change a theme, to say any one of these http://www.theme4.com/free-silverstripe-themes.html]=http://www.theme4.com/free-silverstripe-themes.html]http://www.theme4.com/free-silverstripe-themes.html ?
I tried this and broke the site!
1) Uploaded new theme folders to /themes/
2) Changed SSViewer::set_theme('paddygreen'); in /mysite/_config.php
$project = 'mysite';
$database = "";
// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.com/themes/
Got error message: Fatal error: SS_ENVIRONMENT_TYPE must be defined in your _ss_environment.php. See http://doc.silverstripe.com/doku.php?id=environment-management for more infomration in /home/useraccount/public_html/cms/sapphire/conf/ConfigureFromEnv.php on line 51
3) Changed _ss_environment.php file in root to:
/* Database connection */
kept getting same error.
4) Removed _ss_environment.php from root and F5
root resolved to /install.php (which has of course been removed) and returned a "Problem loading page" error. Doh!
Is there an easy way to change templates?
12 May 2010 at 2:52pm
You need to define a database name in your _config.php file. Also, with the environment file error, you didn't actually address the constant that was undefined.
12 May 2010 at 4:46pm
Thanks. But do you mean that:
a) SS_DATABASE_SERVER means database NAME, or that
b) I should add an extra line of code such as:
12 May 2010 at 4:52pm
To fix the environment error you needed to add "define('SS_ENVIRONMENT_TYPE', 'dev/test/live');" to your environment file. The reason you keep getting redirected to install.php is because you haven't set the database name in your _config.php file to anything.
$database = "";
Needs to have a database name. Alternatively, you can define SS_DATABASE_CHOOSE_NAME to have SilverStripe automatically generate a database name from your project name and some other information.
12 May 2010 at 5:05pm
Did that, but unfortunately there are yet more errors:
Line 56 of ConfigureFromEnv.php
Line 9 of _config.php
Line 5771 of manifest-main
Line 70 of ManifestBuilder.php
Line 150 of Core.php
Line 61 of main.php
Warning: Director::set_environment_type passed 'dev/test/live'. It should be passed dev, test, or live in /home/useraccount/public_html/cms/03/sapphire/core/control/Director.php on line 712
Seems a lot of trouble just to change a template. Are the modules like this as well?
12 May 2010 at 8:09pm
It takes 1 of dev, test or live, not all 3 at the same time .
For example define('SS_ENVIRONMENT_TYPE', 'dev'); defined a development environment.
12 May 2010 at 8:43pm
Thanks Willr. Spotted that a while after, and changed it to "live".
Still not having much fun though. New Error from the script says:
There has been an error
The website server has not been able to respond to your request.
It's a shame as a few of my coders suggested SilverStripe as a CMS we could use. It's just so much trouble just to change a template.
Thanks all the same.
12 May 2010 at 8:44pm
You should change it to dev in this case so you can see the actual error message instead of this generic one. Its probably something very simple
Page: 1 2
|Go to Top||Next >|