Jump to content

[SOLVED] Blank page after first step


Recommended Posts

Hello.

I have a problem on my prestashop page. When i am trying to order it gives me a blank page...
I am sure that it has something to do with my editing and i have messd up somewhare.
I need help finding the problem.

When i put an item in my cart and go to the checkout and come to the first spet of the checkout everything still works but when i click on next to proceed to the secund spet in gives me a blank page.

The blank url is:
domain.com/index.php?controller=order&step=1

I have tried to find the problem among the .tpl files but it is too much to sort out and actully i am not sure that it is a .tpl file that is causing this problem. So now i am standing i don't know if i should delete the whole thing and reinstall or keep looking for the problem.

And also this urli gets blank:
domain.com/ndex.php?controller=order&step=1&multi-shipping=0
But this problem occurs when i am not singed and still i am trying to buy somthing. Like before i can get to the checkout then i need to sign in and when i try to do that the blank page comes.

Please help.

Edited by vekia (see edit history)
Link to comment
Share on other sites

This is the error i am getting:

Fatal error: Uncaught exception 'SmartyCompilerException' with message 'Syntax Error in template "/home/avtodeli/public_html/test/themes/leomobi/order-address.tpl" on line 88 "{if !$smarty.foreach.inv_loop.first},{/if}{$field_name|json_encode}" unknown modifier "json_encode"' in /home/avtodeli/public_html/test/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php:667 Stack trace: #0 /home/avtodeli/public_html/test/tools/smarty/sysplugins/smarty_internal_compile_private_modifier.php(132): Smarty_Internal_TemplateCompilerBase->trigger_template_error('unknown modifie...', 88) #1 /home/avtodeli/public_html/test/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(475): Smarty_Internal_Compile_Private_Modifier->compile(Array, Object(Smarty_Internal_SmartyTemplateCompiler), Array, NULL, NULL) #2 /home/avtodeli/public_html/test/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php(259): Smarty_Internal_TemplateCompilerBase->callTagCompiler('private_modifie...', Arr in /home/avtodeli/public_html/test/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 667
Link to comment
Share on other sites

SOLVED!

in the order-address.tpl need to change the line 88  and 93
From:
{if !$smarty.foreach.inv_loop.first},{/if}{$field_name|json_encode}

{if !$smarty.foreach.inv_loop.first},{/if}{$pattern_name|json_encode}:{$field_name|json_encode}

To:

{if !$smarty.foreach.inv_loop.first},{/if}"{$field_name}"

{if !$smarty.foreach.inv_loop.first},{/if}"{$pattern_name}":"{$field_name}"

Still not sure why it did this.

Edited by Marino1988 (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 4 months later...

For this kind of issues with blank pages always enable the Debug Mode, this is how you do it:

Enabling errors display

 

1. You can enable built in Debug Mode of PrestaShop engine, open config\defines.inc.php file and locate the following line:
 

define('_PS_MODE_DEV_', true);

replace it with

define('_PS_MODE_DEV_', true);

Enabling errors logging

2. To log the errors without displaying them, you need to open index.php file from the root of your PrestaShop installation and at the top add the following code:

<?php error_reporting(0); 

$old_error_handler = set_error_handler("userErrorHandler");


function userErrorHandler ($errno, $errmsg, $filename, $linenum,  $vars) 
{
$time=date("d M Y H:i:s"); 
// Get the error type from the error number 
$errortype = array (1    => "Error",
2    => "Warning",
4    => "Parsing Error",
8    => "Notice",
16   => "Core Error",
32   => "Core Warning",
64   => "Compile Error",
128  => "Compile Warning",
256  => "User Error",
512  => "User Warning",
1024 => "User Notice");
$errlevel=$errortype[$errno];


//Write error to log file (CSV format) 
$errfile=fopen("errors.csv","a"); 
fputs($errfile,"\"$time\",\"$filename: 
$linenum\",\"($errlevel) $errmsg\"\r\n"); 
fclose($errfile);


if($errno!=2 && $errno!=8) {
//Terminate script if fatal error
die("A fatal error has occurred. Script execution has been aborted");
} 

}

?>

Save the file and try to access your PrestaShop store or admin panel.
After this you’ll be able to see errors.csv file created on your server. It contains the log of the occurred errors.

Edited by vekia (see edit history)
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...