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.

General Questions

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

New template breaks site


Go to End
Reply

9 Posts   1219 Views

Avatar
mamo

3 August 2011 at 5:50am (Last edited: 3 August 2011 5:50am), Community Member, 5 Posts

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

?>

Avatar
zenmonkey

3 August 2011 at 6:22am Community Member, 528 Posts

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

Avatar
mamo

3 August 2011 at 6:58am Community Member, 5 Posts

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

Avatar
Willr

3 August 2011 at 7:10pm Forum Moderator, 5511 Posts

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

Avatar
mamo

4 August 2011 at 12:06am Community Member, 5 Posts

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.

Avatar
martimiz

4 August 2011 at 2:12am (Last edited: 4 August 2011 2:15am), Forum Moderator, 1091 Posts

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 ?

Avatar
zenmonkey

4 August 2011 at 2:15am Community Member, 528 Posts

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

Avatar
mamo

4 August 2011 at 5:04am Community Member, 5 Posts

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.

Go to Top