Jump to:

22993 Posts in 11595 Topics by 2824 members

General Questions

SilverStripe Forums » General Questions » New template breaks site

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 2
Go to End
Author Topic: 1058 Views
  • mamo
    Avatar
    Community Member
    5 Posts

    New template breaks site Link to this post

    Hi,
    I've uploaded on my website a new template. At the beginning, everything looked perfect but apparently without any reason, the next day the site showed a blank page.

    I've tried the following without any luck:
    - /dev/build?flush=all
    - Reverting to the previous template

    I'd like to get at least an error message to better understand the problem but even adding Director::set_environment_type('dev'); and Debug::send_errors_to('myemail.com'); I didn't get any clues.

    Here follows my _config.php: any help would be very appreciated,
    Mauro.

    <?php

    global $project;
    $project = 'mysite';

    global $databaseConfig;
    $databaseConfig = array(
       "type" => "MySQLDatabase",
       "server" => "*****",
       "username" => "*****",
       "password" => "*****",
       "database" => "*****",
    );

    // Sites running on the following servers will be
    // run in development mode. See
    // http://doc.silverstripe.com/doku.php?id=devmode
    // for a description of what dev mode does.
    Director::set_dev_servers(array(
       'localhost',
       '127.0.0.1',
    ));

    // This line set's the current theme. More themes can be
    // downloaded from http://www.silverstripe.com/cms-themes-and-skin
    SSViewer::set_theme('pinksheep');

    BlogEntry::allow_wysiwyg_editing();
    Director::set_environment_type('dev');

    Debug::send_errors_to('myemail.com');

    MollomServer::setPublicKey("*****************");
    MollomServer::setPrivateKey("****************");
    SpamProtectorManager::set_spam_protector('MollomSpamProtector');

    Form::disable_all_security_tokens();

    ?>

  • zenmonkey
    Avatar
    Community Member
    524 Posts

    Re: New template breaks site Link to this post

    You can also add ?isDev=1 or &isDev=1 to the end of your URL and get a little more details. Also ?debug=1 may help

    http://doc.silverstripe.org/sapphire/en/reference/urlvariabletools

  • mamo
    Avatar
    Community Member
    5 Posts

    Re: New template breaks site Link to this post

    Thank you for the follow up!
    I've tried all of the suggested urls but no luck: always the same meaningless blank page.
    Do I have to log on as admin before? Obviously I can't since neither the admin pages work.

    Please, help!
    Mauro

  • Willr
    Avatar
    Forum Moderator
    5462 Posts

    Re: New template breaks site Link to this post

    You may also get a blank page if your server is set to display_errors = Off (or 0). You want to check your PHP error log for the error or set display_errors to '1' to see the error message. Likely an PHP error with your syntax

  • mamo
    Avatar
    Community Member
    5 Posts

    Re: New template breaks site Link to this post

    I'm on a shared hosting: is it something I can check by myself or do I have to ask something to the hoster?

    Thank you,
    M.

  • martimiz
    Avatar
    Forum Moderator
    1035 Posts

    Re: New template breaks site Link to this post

    Often, if you have access to a console like plesk, you can take a look at the logfiles from there.

    Did you try to remove the offending template and do a ?flush=1 ?

  • zenmonkey
    Avatar
    Community Member
    524 Posts

    Re: New template breaks site Link to this post

    There used to be a way you force login from the URL, what happened to that?

  • mamo
    Avatar
    Community Member
    5 Posts

    Re: New template breaks site Link to this post

    Finally I'm shedding some light...
    Seems like that my girlfriend has ignored some mails from the hosting provider which stated that on 1st of august the PHP version would have been upgraded to 5.3!
    So what have broken everything wasn't the template (which in turn have worked fine for a day) but the new PHP version.

    The question now is: how can I upgrade silverstripe to a versione 5.3-compatible?
    Is it possible to procede with a normal upgrade even if the site at the moment is down?

    Thank you very much for you support.

    M.

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