Jump to content

Blank main page of back office, rest of pages works! Smarty issue


Recommended Posts

Hello !

 

After I login to back office I see blank page. When I turn on error reports I get this :

Parse error: syntax error, unexpected $end in /public_html/mooncakeshop/cache/smarty/compile/17/77/4e/17774e986878844cac81ae8ef0cb039f09b7cd3f.file.content.tpl.php on line 279

 

I try to fix the code by myself but without any luck.. the 279 is the last line.

 

This is the last few lines of code (I also attache php file):

 

<script type="text/javascript">
$(document).ready(function() {
if (<?php echo $_smarty_tpl->tpl_vars['refresh_check_version']->value;?>
)
{
$('#blockNewVersionCheck').hide();
$.ajax({
type : 'POST',
data : {
ajax : '1',
controller : 'AdminHome',
token : '<?php echo $_smarty_tpl->tpl_vars['token']->value;?>
',
id_employee : '<?php echo $_smarty_tpl->tpl_vars['employee']->value->id;?>
',
action : 'refreshCheckVersion'
},
url: 'ajax-tab.php',
dataType : 'json',
success: function(data) {
if (!data)
jAlert("TECHNICAL ERROR - no return status found");
else if (data.status != "ok")
jAlert("TECHNICAL ERROR: "+data.msg);
if(data.upgrade.need_upgrade)
{
$('#blockNewVersionCheck').children("a").attr('href',data.upgrade.link);
$('#blockNewVersionCheck').children("a").html(data.upgrade.link+"pouet");
$('#blockNewVersionCheck').fadeIn('slow');
}
 
 
},
error: function(data, textStatus, errorThrown)
{
jAlert("TECHNICAL ERROR: "+data);
}
});
}
$.ajax({
url: "ajax-tab.php",
type: "POST",
data:{
token: "<?php echo $_smarty_tpl->tpl_vars['token']->value;?>
",
ajax: "1",
controller : "AdminHome",
action: "getAdminHomeElement"
},
dataType: "json",
success: function(json) {
<?php if ($_smarty_tpl->tpl_vars['employee']->value->bo_show_screencast){?>
if (json.screencast != 'NOK')
$('#adminpresentation').fadeIn('slow');
else
$('#adminpresentation').fadeOut('slow');
<?php }?>
$('#partner_preactivation').fadeOut('slow', function() {
if (json.partner_preactivation != 'NOK')
$('#partner_preactivation').html(json.partner_preactivation);
else
$('#partner_preactivation').html('');
$('#partner_preactivation').fadeIn('slow');
});
 
$('#discover_prestashop').fadeOut('slow', function() {
if (json.discover_prestashop != 'NOK')
$('#discover_prestashop').replaceWith(json.discover_prestashop);
else
$('#discover_prestashop').html('');
$('#discover_prestashop').fadeIn('slow');
});
},
error: function(XMLHttpRequest, textStatus, errorThrown)
{
// don't show/hide screencast if it's deactivated
<?php if ($_smarty_tpl->tpl_vars['employee']->value->bo_show_screencast){?>
$('#adminpresentation').fadeOut('slow');
<?php }?>
$('#partner_preactivation').fadeOut('slow');
}
});
});
</script>

 

Thanks!

 

issue.php

Link to comment
Share on other sites

Try to clear cache.

 

If error will be still present - you need to fix smarty templates (they have extension *.tpl, NOT *.tpl.php - it is compiled templates).

Error in compiled templates is caused by error in some of smarty templates.

templates are here: {PRESTASHOP_FOLDER}/themes/{THEME_NAME}

 

And if you have saved templates (from your store before this error) - restore them and use them.

 

Or you can use original templates from the prestashop download page.

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...