22993 Posts in 11829 Topics by 2827 members
|Go to End|
2 July 2010 at 3:34am
I was doing minor changes to my vebsite (template mostly) and suddenly after a ?flush=all I now get to see a blank page on login page .
I then cheked my php error log and this what I got :
[Thu Jul 01 17:22:45 2010] [error] [client xx.xxx.xxx.xxx] PHP Parse error: syntax error, unexpected '<', expecting T_STRING or T_VARIABLE or '$' in /tmp/silverstripe-cache-var-www-vhosts-xxxxxxx.com-httpdocs-test_lg/.cache.var.www.vhosts.xxxxxxx.com.httpdocs.test_lg.themes.blackcandy.templates.Page.ss on line 70
I'm know trying to correct this line 70 but I can't fine any because my Page.ss or Page.php doesn't go that far .
Does anyone have a clue ?
2 July 2010 at 4:43pm
Don't take the line number seriously, this would be the compiled line number rather than the file line number. I suggest you remove parts of your Page.ss template until it works again. Once it starts working you'll know what code is causing the error.
2 July 2010 at 6:57pm
Just curious ... would adding ?showtemplate=1 to the URL show the correct line number as reported in the PHP log?
I've yet to use this when it's actually needed.
3 July 2010 at 3:31am
Check your template for syntax errors. Make sure all tags are closed, all variables are marked correctly, and all quotes are the correct ones (none of those "smart quotes" if you've copied code from anywhere) and closed with matching quotes.
If you're using a program that highlights code, you can usually set it to recognize .ss files as HTML, which will provide code highlighting for the parts it recognizes, making it easier to spot errors.
|Go to Top|