blank_screen Posted December 14, 2013 Share Posted December 14, 2013 Hi, My site has been infected with malware, besically a piece of code (some css together with iframe) has been added up to nearly all index.php and most of the .tpl files. The code was redirecting my site to some .ru domain, leaving blank page, also I wasn't able to login to my back office. I managed to remove the code using Dreamweaver Find and Replace function from (I think) all the infected files, everything seems working well now, apart from the right and center columns, which disappear when clicked on checkout or basket button, the footer disappears as well. It looks like some piece of malicious code is still there or I removed something I shouldn't touch. I tried to use firebug to find out, but no luck, hope someone will be able to help me out with this, thanks in advance. I'm using Prestashop 1.3.1. This is the link http://goo.gl/zNr9yJ Link to comment Share on other sites More sharing options...
vekia Posted December 14, 2013 Share Posted December 14, 2013 hello please turn on error reporting, then instead of "blank" space you will see message what and where doesn't work (error log) 1 Link to comment Share on other sites More sharing options...
blank_screen Posted December 14, 2013 Author Share Posted December 14, 2013 Hello vekia, Thanks for your reply, I managed to turn error reporting "on" and this is what I got: After clicking basket or checkout button on the right: Fatal error: Smarty error: [in /usr/local/pem/vhosts/146341/webspace/httpdocs/themes/prestashop/shopping-cart.tpl line 192]: syntax error: invalid attribute name: '$customization.quantity' (Smarty_Compiler.class.php, line 1550) in /usr/local/pem/vhosts/146341/webspace/httpdocs/tools/smarty/Smarty.class.php on line 1095 After clicking any link in the menu: Fatal error: Smarty error: [in /usr/local/pem/vhosts/146341/webspace/httpdocs/themes/prestashop/./pagination.tpl line 29]: syntax error: expecting '=' after attribute name '1' (Smarty_Compiler.class.php, line 1558) in /usr/local/pem/vhosts/146341/webspace/httpdocs/tools/smarty/Smarty.class.php on line 1095 In both cases after comparing with my backup files I noticed that the "+" sign was missing in three places, I fixed that, no problem. There is no blank space any more, the cart and checkout seem to work ok, only the pagination problem is still there. This is what I got now: Parse error: syntax error, unexpected T_LNUMBER in /usr/local/pem/vhosts/146341/webspace/httpdocs/tools/smarty/compile/%%B4^B40^B40B7A81%%pagination.tpl.php on line 74 I looked into that file and this is the line 74: <?php if ($this->_tpl_vars['pages_nb'] > $this->_tpl_vars['stop'] 2): ?> Now, I don't have that file in my backup files to compare, but I assumed that again the "+" sign is missing between "['stop']" and "2", but after I put the "+" sign the error is still there. Thanks in advance for your help. Link to comment Share on other sites More sharing options...
vekia Posted December 14, 2013 Share Posted December 14, 2013 hello you use default theme? if so, try to replace files: /themes/prestashop/shopping-cart.tpl /themes/prestashop/shopping-cart.tpl with original files. 1 Link to comment Share on other sites More sharing options...
blank_screen Posted December 14, 2013 Author Share Posted December 14, 2013 (edited) I think I use default theme, the folder is called prestashop, after replacement still no go:/ Any ideas? Thanks! Edited December 14, 2013 by blank_screen (see edit history) Link to comment Share on other sites More sharing options...
vekia Posted December 14, 2013 Share Posted December 14, 2013 still the same errors appear? 1 Link to comment Share on other sites More sharing options...
blank_screen Posted December 14, 2013 Author Share Posted December 14, 2013 (edited) Parse error: syntax error, unexpected T_LNUMBER in /usr/local/pem/vhosts/146341/webspace/httpdocs/tools/smarty/compile/%%B4^B40^B40B7A81%%pagination.tpl.php on line 74 Yes, I added "+" into that line 74, reuploaded the file and it still says that there is error in line 74. EDIT: Maybe I should try to enable force compile? I'm not sure if that's on or off, where to look for it in 1.3.1? That came to my mind after I removed that %%B4^B40^B40B7A81%%pagination.tpl.php file from the server and the message kept saying that the line 74 has an error not even noticing that the file is gone. strange.. EDIT2: I now know why it keeps saying that the line 74 has an error even after fixing. When I removed the file from the server it has been recreated again by prestashop and guess what, there was no "+" between "['stop']" and "2", any idea how can I overwrite this file on the server? Looks like it is not allowing me to make any changes to that file or not seeing them. Edited December 14, 2013 by blank_screen (see edit history) Link to comment Share on other sites More sharing options...
blank_screen Posted December 14, 2013 Author Share Posted December 14, 2013 Anyone any ideas? Thanks in advance! Link to comment Share on other sites More sharing options...
vekia Posted December 14, 2013 Share Posted December 14, 2013 ok so two errors that you've got before disappeared. now it's time to clear shop cache (because you've got this problem in cached file) go to adv. paramters > performance there is a button to clear smarty cache use it 1 Link to comment Share on other sites More sharing options...
blank_screen Posted December 14, 2013 Author Share Posted December 14, 2013 (edited) That won't work I think... I'm on 1.3.1 version.. there is no such thing as adv.parameters I'm afraid, or maybe I just can't find it? EDIT: Can I just safely delete all the files from tools/smarty/compile tools/smarty/cache ?? Edited December 14, 2013 by blank_screen (see edit history) Link to comment Share on other sites More sharing options...
blank_screen Posted December 14, 2013 Author Share Posted December 14, 2013 I've done it! One "+" was still missing in pagination.tpl! All seems to work well now! Thanks vekia for your help! Link to comment Share on other sites More sharing options...
vekia Posted December 14, 2013 Share Posted December 14, 2013 hello thank you for information that you solved it i marked this topic as [solved] with regards, Milos Link to comment Share on other sites More sharing options...
Recommended Posts