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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

v2.3.3 blank page suddenly after ?flush=1 HELP!


Go to End


21 Posts   7441 Views

Avatar
Juanitou

Community Member, 323 Posts

15 October 2009 at 9:34am

Edited: 15/10/2009 9:36am

Hi again.

That’s strange. I’m not seeing any errors and I could do dev/build. Could you please paste them here?

Also, try to delete your blog folder and running dev/build again.

Avatar
kudesign

Community Member, 64 Posts

15 October 2009 at 9:46am

Edited: 15/10/2009 9:47am

I deleted the blog mod, and run a dev/build still no luck. The error page can be seen: http://nisglass.co.nz/nz/?flush=1

For some reason it only shows when you ?flush=1

It beats me...

Looks like there is something to do with the i18n?

this is what I have setup for i18n, and the rest of my _config.php

// This set the multilingual contents
Object::add_extension('SiteTree', 'Translatable');
Translatable::set_default_locale('en_GB');

// i18n to define locale values
i18n::enable();
// Define allowed locales overriding those present in i18n::$common_locales
global $allowed_locales;
$allowed_locales = array(
'en_GB' => array('English','English'),
'zh_TW' => array('Traditional Chinese', 'Traditional'),
'zh_CN' => array('Simplified Chinese', 'Simplified')
);
i18n::$common_locales = $allowed_locales;

SpamProtectorManager::set_spam_protector('RecaptchaProtector');
RecaptchaField::$public_api_key = 'mycodehere';
RecaptchaField::$private_api_key = 'mycodehere';

// field creation
$recaptchaField = new RecaptchaField('MyCaptcha');
$recaptchaField->jsOptions = array('theme' => 'blackglass'); // optional

?>

Avatar
Juanitou

Community Member, 323 Posts

15 October 2009 at 11:05am

Edited: 15/10/2009 11:06am

Wow, that’s ugly… How could you find an ‘unmatched close parenthesis’ there?

I don’t think the problem comes from your _config.php setup, but from something in the Page.ss template or in your lang files (as ereg_replace tries to transform _t() functions in SS files in translated content). On the other hand, you’re using Blackcandy and out-of-the-box SS content, isn’t it ? I don’t understand.

Have you tried disabling i18n or Translatable?

Sorry for not being more helpful,
Juan

Avatar
kudesign

Community Member, 64 Posts

15 October 2009 at 11:21am

Edited: 15/10/2009 11:22am

Thanks for your reply and kind support! I did try disabling i18n, but still did not fix it. I had a custom template designed and worked all along, and then when it went blank, I tried to switch it back to 'blackcandy', that didn't fix it either.

I even tried to re-upload 'cms' 'sapphire' & 'cms' folders, and rebuild the site multiple times, still no help... i don't know why it would suddenly go blank on a site I spent months building, and wiped in just one flush! this is really quit scary!

I wonder if a SS tech could provide some feedback regarding a way to revive my site and its contents, as I really think SS is a very promising CMS. Fingers crossed for any other alternative fixes!

Avatar
b0bro

Community Member, 38 Posts

15 October 2009 at 11:21am

Edited: 15/10/2009 11:27am

hi kuddesign,

using flush=1 will flush the ss cache and force a re-load of all the pages again. It is not weird that using it caused this. It is VERY likely you've changed something and left a php syntax error. That is why your getting a white screen of death now.

Re-uploading the core files eg (cms, jsparty, etc) will not resolve this issue as the problem is in your sites code folder.

If you cant see the error logs (try contacting your host company, they can help)

Then i would suggest re-tracing your steps back. What have you changed? What is custom? What is core?, try commenting custom code out block by block. Remember to always do a dev/build/?flush=1 and a ?flush=1 as you go.

Eventually you will find the problem.

Because your error seems to be on all pages, i would start with checking your classes particularly page.php

How To Avoid This:

In the future I would suggest when your developing that you continually test.

I tend to develop with two tabs open in firefox. One on the dev/build/?flush=1 and the other on the page i'm working on. That way i can just refresh (F5) as i go and test. If something is not working, ill know about it straight away and also know where the code is that i've been changing.

Good luck!

Avatar
Juanitou

Community Member, 323 Posts

15 October 2009 at 9:08pm

The advice from bobro is certainly the best. Well put.

Avatar
kudesign

Community Member, 64 Posts

15 October 2009 at 9:47pm

Yes indeed! Experience is painful, I learn it the hard way. I am just scraping the surface of php, and have been trying to get multi-lingual, and designing my own template, there has been much hacking and trialing attempts, so I would have no idea where had went wrong...

I used to just refreshed my browser every time thinking everything worked... only after the ?flush the problem/s surfaced.

Unfortunately, after a whole day and night of tweaking and de-bugging + sleepless night and still seeing blank white pages, I finally decided to give wordpress a try. Well, this is what I have come up with in just 6 hours: http://nisglass.co.nz

I have to say wordpress is a good blogging & CMS, mods are easy to implement, and templates easy to hack.

I still like SS, just haven't got the time to debug it, as this site needed to be live yesterday...

Big thanks to all your support!

Avatar
Brad

Community Member, 8 Posts

31 October 2009 at 12:45pm

I am having the same problem.

Blank pages for every page andd I'm sure its nothign to do with my code. The site runs fine locally.

my forum post here:

http://silverstripe.org/general-questions/show/272079#post272079

It looks like you've abandoned SIlverstripe. If you are still subscribed to this, were you using openhost to host your site? I have a feelign they may have changed something.

i am getting errors on a PHP function 'ereg_replace'.

By the way - god the Silverstripe forums search suck. I foudn this post randomly even though I have been searching for "blank page" and a million variations for 3 days.