Jump to content

Problem after delete smarty cache


Recommended Posts

Hi,

I deleted (Clear) smarty cache prestashop (v1.4) but after that my web doesn't work ( blank page )

Any ideas on how to fix this?

thanks

 

how you cleared smart cache? you deleted files manually?

if so, what files exactly?

 

and of course follow Nemo's suggestion :)

Link to comment
Share on other sites

i suppose that now you haven't got enough memory to recompile whole theme, but I could be wrong.

to know what exactly going on there, please follow Nemo's advice above about turning on error reporting,

then instead of blank page you will see error code (what and where doesn't work)

Link to comment
Share on other sites

i suppose that now you haven't got enough memory to recompile whole theme, but I could be wrong.

to know what exactly going on there, please follow Nemo's advice above about turning on error reporting,

then instead of blank page you will see error code (what and where doesn't work)

thanks

Link to comment
Share on other sites

  • 4 months later...

Hello,

I have the same problem on PS 1.6

Blank page on front end after I cleared the Smarty cache automatically (using the back office button).

I tried to regenerate the htaccess, to activate/disactivate smarty cache, cache, URL friendly, etc... but nothing solved my problem.

Can you help me please ?

Link to comment
Share on other sites

Hello,

I have the same problem on PS 1.6

Blank page on front end after I cleared the Smarty cache automatically (using the back office button).

I tried to regenerate the htaccess, to activate/disactivate smarty cache, cache, URL friendly, etc... but nothing solved my problem.

Can you help me please ?

 

Did you turn on error reporting as well?

Link to comment
Share on other sites

  • 9 months later...

Did you turn on error reporting as well?

 

Oh hey I'm sorry. This following error for my front store:

 

Fatal error: Uncaught --> Smarty Compiler: Syntax error in template "/home/h37644/public_html/themes/pos_sagitta3/footer.tpl" on line 79 "(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){" - Unexpected "[", expected one of: "}" <-- thrown in /home/h37644/public_html/tools/smarty/sysplugins/smarty_internal_templatecompilerbase.php on line 79

Link to comment
Share on other sites

It appears that google analytics is broken, try disabling it first, just to make sure it really is the source of the error. What's the module's version?

 

I use google analytics module version v2.0.5 and google analytics api v1.0.3. I've deleted tracking code from footer.tpl and my store is back, the problem is solved but google analytic doesn't showing traffic realtime. What should I do?

Link to comment
Share on other sites

Do you have a local copy of your site? If you do, try a global search for that string in the whole folder, it will find the source of the error. If not, try downloading the modules folder only first, then classes and controllers, and lastly overrides. It might as well be in the theme so.... well download the whole site :D

Link to comment
Share on other sites

In product-list.tpl there is this code for roll-over effect:
 

<!-- Modifica Daniele per effetto RollOver -->
 
<div class="product-image-container">
<a class="product_img_link" href="{$product.link|escape:'html':'UTF-8'}" title="{$product.name|escape:'html':'UTF-8'}" itemprop="url">
{assign var='productimg' value=Tools::getProductsImgs($product.id_product)}
{if isset($productimg[0]) && isset($productimg[1])}
<img  class="replace-2x img-responsive img_0"  src="{$link->getImageLink($product.link_rewrite,$product.id_product|cat:"-"|cat:$productimg[0].id_image, 'home_default')}" alt="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" title="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} itemprop="image" />
<img class="replace-2x img-responsive img_1" src="{$link->getImageLink($product.link_rewrite,$product.id_product|cat:"-"|cat:$productimg[1].id_image, 'home_default')}" alt="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" title="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if}  />
{else}
<img class="replace-2x img-responsive" src="{$link->getImageLink($product.link_rewrite, $product.id_image, 'home_default')|escape:'html':'UTF-8'}" alt="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" title="{if !empty($product.legend)}{$product.legend|escape:'html':'UTF-8'}{else}{$product.name|escape:'html':'UTF-8'}{/if}" {if isset($homeSize)} width="{$homeSize.width}" height="{$homeSize.height}"{/if} itemprop="image" />
{/if}
</a>
 
<!-- Fine Modifica Daniele per effetto RollOver -->
 
 
and in ovveride/classes/tools.php there is the function: getProductsIMG:
 
<?php
 
class Tools extends ToolsCore
{
public static function getProductsImgs($product_id)
{
$sql = '
(SELECT * from `'._DB_PREFIX_.'image`
WHERE id_product="'.$product_id.'" and cover=1)
 
union
(SELECT * from `'._DB_PREFIX_.'image`
WHERE id_product="'.$product_id.'" and cover=0 ORDER BY `position` LIMIT 0,1 )
 
LIMIT 0,2
';
$result = Db::getInstance()->ExecuteS($sql);
return $result;
}
}
 
 
 
 
and now... ???? ? :-)

 

 

 


 

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

  • 1 year later...

the same thing happened after clearing the cache through backend in 1.6.1.4

Error

Notice: Undefined property: stdClass::$smarty in /home/ktmtest2/testktmcloth.com/classes/module/Module.php on line 2330

Fatal error: Call to a member function createTemplate() on null in /home/ktmtest2/testktmcloth.com/classes/module/Module.php on line 2330

 

help on this

Link to comment
Share on other sites

yes all of them tried both enabling disabling of overides and non prestashop modules. also the cache is off and force compliation is on . but didnt work yesterday but today when i disabled the overrides the site came back. so i guess its all due to the smarty cache or pure cache . the clear chache doent remove whole cache properly which makes the down for a day .

 

thie same thing happend few days ago but it solved after few moments but this time it took so long.

i dont know whats wrong with the clear cache thing .

also would it be ok to clear the cache manually from ftp ?

Link to comment
Share on other sites

  • 9 months later...

I know it's an old thread but I want to bump it because I have a similar problem after updating to Prestashop 1.6.1.11

Back-office working, frontpage blank when I empty cache. (I can get my frontpage back by deleting /cache/class_index.php)

This is my error message:

Fatal error: Uncaught Error: Call to undefined method Product::getProductsImages() in /home/order123/public_html/modules/specialslider/specialslider.php:109 Stack trace: #0 /home/order123/public_html/classes/Hook.php(587): SpecialSlider->hookDisplayHome(Array) #1 /home/order123/public_html/classes/Hook.php(542): HookCore::coreCallHook(Object(SpecialSlider), 'hookdisplayHome', Array) #2 /home/order123/public_html/controllers/front/IndexController.php(40): HookCore::exec('displayHome') #3 /home/order123/public_html/classes/controller/Controller.php(189): IndexControllerCore->initContent() #4 /home/order123/public_html/classes/Dispatcher.php(367): ControllerCore->run() #5 /home/order123/public_html/index.php(28): DispatcherCore->dispatch() #6 {main} thrown in /home/order123/public_html/modules/specialslider/specialslider.php on line 109

 

All help appreciated!

Link to comment
Share on other sites

×
×
  • Create New...