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.

Themes /

Discuss SilverStripe Themes.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Problem installing theme


Reply


17 Posts   4220 Views

Avatar
Herries

Community Member, 12 Posts

4 August 2010 at 10:00pm

I've found that if you change anything in the mysite/_config.php file, it permanently disables the whole silverstripe installation. I see other people have encountered this as well. This is a SERIOUS flaw that the silverstripe team should address. I've spent an entire day trying to find a fix but the only solution is a clean insall. Arrrrrrrgggggghhhhhhhh!!!

Avatar
Ryan M.

Community Member, 309 Posts

5 August 2010 at 6:28am

ANYthing? I find that hard to believe.

If you input the incorrect database info or mistype your project name, or theme name, then yeah I can see how that might cause some headaches and break the site.

Avatar
Willr

Forum Moderator, 5513 Posts

5 August 2010 at 8:17pm

I've found that if you change anything in the mysite/_config.php file, it permanently disables the whole silverstripe installation

To expand on what Ryan said, It shouldn't 'disable' anything. Make sure you put whatever you want to add at the bottom of the file (rather than the right top) as this can mess with some includes and if you have a ?> then it should be *before* this.

Make sure you have devmode on (see http://doc.silverstripe.org/debugging#dev_mode) and display_errors set to on (in your php.ini file) so you can see the error message while you're developing.

Avatar
Herries

Community Member, 12 Posts

7 August 2010 at 10:51am

I only added one line at the end of my mysite/_config.php file and it again completely disabled everything!!!! Please help!

My _config.php file looks like this:

<?php

global $project;
$project = 'mysite';

global $database;
$database = '';

require_once('conf/ConfigureFromEnv.php');

MySQLDatabase::set_connection_charset('utf8');

// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.org/themes/
SSViewer::set_theme('blackcandy');

// enable nested URLs for this site (e.g. page/sub-page/)
SiteTree::enable_nested_urls();
HtmlEditorConfig::get('cms')->setOption('extended_valid_elements', "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|
usemap|style],iframe[src|n");

Avatar
Herries

Community Member, 12 Posts

7 August 2010 at 10:56am

P.s. I tried enabling dev mode by adding Director::set_environment_type("dev"); at the end of my mysite/_config.php file but it also disables the cms and website.

I just keep getting the same stupid error: "The page isn't redirecting properly Firefox has detected that the server is redirecting the request for this address in a way that will never complete. This problem can sometimes be caused by disabling or refusing to accept
cookies."

P.p.s. I don't have access to the php.ini file as I'm working on a company's remote server.

Avatar
Herries

Community Member, 12 Posts

7 August 2010 at 11:36am

It's working now, Hallelujah! This is what my mysite/_config.php looks like now:
<?php

global $project;
$project = 'mysite';

global $databaseConfig;
$databaseConfig = array(
"type" => "MySQLDatabase",
"server" => "localhost",
"username" => "xxxxxxxxxx",
"password" => "xxxxx",
"database" => "xxxxxxxxx",
);

require_once('conf/ConfigureFromEnv.php');

MySQLDatabase::set_connection_charset('utf8');

// This line set's the current theme. More themes can be
// downloaded from http://www.silverstripe.org/themes/
SSViewer::set_theme('blackcandy');

// enable nested URLs for this site (e.g. page/sub-page/)
SiteTree::enable_nested_urls();
//Director::set_environment_type('dev');
HtmlEditorConfig::get('cms')->setOption('extended_valid_elements', "img[class|src|alt|title|hspace|vspace|width|height|align|onmouseover|onmouseout|name|usemap|style],iframe[src|n");

It looks like the database config was the problem. It seems this part of the file is not configured automatically with the silverstripe install. Hope someone else finds this useful.

Avatar
Ryan M.

Community Member, 309 Posts

7 August 2010 at 4:14pm

Lol....

If you ran the installer, it prevents you from continuing if the database fields aren't filled out properly. This was most likely human error. ;-)

Avatar
Robert Dowell

Community Member, 17 Posts

20 August 2010 at 1:56pm

I recently upgraded to 2.4.1, now I can't change the theme. Also, I did away with the ecommerce, payment & payment test modules however when I run dev/build it seems the tables associated with them are still in the database and the siteconfig table doesn't get updated with the mysite/config.php file. The only way I've found to change the theme is to edit the siteconfig table.

Would appreciate any thoughts.
Thanks,
Bob