Jump to:

1347 Posts in 439 Topics by 514 members

Themes

SilverStripe Forums » Themes » Problem installing theme

Discuss SilverStripe Themes.

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

Page: 1 2 3
Go to End
Author Topic: 3889 Views
  • Herries
    Avatar
    Community Member
    12 Posts

    Re: Problem installing theme Link to this post

    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!!!

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Problem installing theme Link to this post

    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.

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: Problem installing theme Link to this post

    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.

  • Herries
    Avatar
    Community Member
    12 Posts

    Re: Problem installing theme Link to this post

    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");

  • Herries
    Avatar
    Community Member
    12 Posts

    Re: Problem installing theme Link to this post

    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.

  • Herries
    Avatar
    Community Member
    12 Posts

    Re: Problem installing theme Link to this post

    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.

  • Ryan M.
    Avatar
    Community Member
    309 Posts

    Re: Problem installing theme Link to this post

    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. ;-)

  • Robert Dowell
    Avatar
    Community Member
    17 Posts

    Re: Problem installing theme Link to this post

    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

    3889 Views
Page: 1 2 3
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.