spletni marketing Posted May 15, 2013 Share Posted May 15, 2013 I have a problem with my prestashop installation. As strange as it might sound, but prestashop caches the name and surname of user and displays name of wrong user... When user visites the shop and has a cookie (or logs in) the user info block displays wrong info on top: Hi Wrongname wrong surname!!!! If i delete all cache data, info is correct, for the first next user, who visites the shop. Next user get cached version of the user info. Prestashop version: 1.5.4.1 Theme: PRS050103 Cache options: Recompile templates if the files have been updated Cache: ON Any ideas how to solve this? Thanks Link to comment Share on other sites More sharing options...
vekia Posted May 15, 2013 Share Posted May 15, 2013 Does this problem occur when you disable the cache in your prestashop? Can you try? Link to comment Share on other sites More sharing options...
spletni marketing Posted May 15, 2013 Author Share Posted May 15, 2013 Does this problem occur when you disable the cache in your prestashop? Can you try? Thanks for intrest in the subject Vekia. When cache is OFF, the user info is correct. Link to comment Share on other sites More sharing options...
vekia Posted May 15, 2013 Share Posted May 15, 2013 really weird, what version of this module you use? It's a default one? Link to comment Share on other sites More sharing options...
spletni marketing Posted May 15, 2013 Author Share Posted May 15, 2013 Well yes module is default one... User info block INSTALLEDDeveloped by :PrestaShop| Version :0.1 | Category :Front Office Features Description : Adds a block that displays information about the customer. Link to comment Share on other sites More sharing options...
mitsos1os Posted May 20, 2013 Share Posted May 20, 2013 (edited) Hi, I have exactly the same problem. Also exists on version 1.5.4.0. Also tried disabling the user info block module, but it is still there. It is really frustrating and it also needs an immediate solution because it is a very big bug (from customers side, to login and see a different name)!!!! Edited May 20, 2013 by mitsos1os (see edit history) Link to comment Share on other sites More sharing options...
spletni marketing Posted May 20, 2013 Author Share Posted May 20, 2013 This bug is really anoying. My temporary hack was to hide the name... div#header ul#header_links li#header_user_info span { display:none; } I still hope someone will find and post a proper solution. 1 Link to comment Share on other sites More sharing options...
mitsos1os Posted May 20, 2013 Share Posted May 20, 2013 Actually I solved it. I figured out that in the template that I was using, this block came from an overriden permanent links module by the template, which used the same code as user info block module. So since there was something wrong with the cache function of this module, I found the file /modules/blockpermanentlinks.php and saw that when it called the hooks, it called the cached files like this: public function hookFooter($params) { return $this->display(__FILE__, 'blockpermanentlinks-footer.tpl', $this->getCacheId('blockpermanentlinks-footer')); } so what I did was to remove the cache part so it will always call a new instance like this: public function hookFooter($params) { return $this->display(__FILE__, 'blockpermanentlinks-footer.tpl'); } and VOILA!!!! Probably you need to find in your template what module is called and disable this way its cache 3 Link to comment Share on other sites More sharing options...
Spyhawk Posted August 1, 2013 Share Posted August 1, 2013 I changed the line in blockpermanentlinks.php and still no luck. Link to comment Share on other sites More sharing options...
mitsos1os Posted August 1, 2013 Share Posted August 1, 2013 Try clearing the cache in your browser with Ctrl+F5 too. If this doesn't work, then maybe you aren't looking in the correct module. Try disabling the one you think is right and check if the information goes missing.... Then try to apply my solution to the module found by disabling its cache duplicate Link to comment Share on other sites More sharing options...
tnov Posted August 6, 2013 Share Posted August 6, 2013 (edited) Actually I solved it. I figured out that in the template that I was using, this block came from an overriden permanent links module by the template, which used the same code as user info block module. So since there was something wrong with the cache function of this module, I found the file /modules/blockpermanentlinks.php and saw that when it called the hooks, it called the cached files like this: public function hookFooter($params) { return $this->display(__FILE__, 'blockpermanentlinks-footer.tpl', $this->getCacheId('blockpermanentlinks-footer')); } so what I did was to remove the cache part so it will always call a new instance like this: public function hookFooter($params) { return $this->display(__FILE__, 'blockpermanentlinks-footer.tpl'); } and VOILA!!!! Probably you need to find in your template what module is called and disable this way its cache Thanks... it works for me and cache is on... great! p.s. I did the same for hookTop(...) function ... Edited August 6, 2013 by tnov (see edit history) Link to comment Share on other sites More sharing options...
Cornerstonegifts Posted August 12, 2013 Share Posted August 12, 2013 (edited) I had the same issue but resolved with above mentioned solution along with "Top Hook" changes Edited August 12, 2013 by Cornerstonegifts (see edit history) Link to comment Share on other sites More sharing options...
Spyhawk Posted August 13, 2013 Share Posted August 13, 2013 Fix it, thanks guys. Used Notepad++ and did a search for the cache function and narrowed it down to the culprit. Link to comment Share on other sites More sharing options...
alex_ta Posted August 16, 2013 Share Posted August 16, 2013 FIXED .. i had same problem with a PRS030072 theme. Thx a lot mitsos1os , you are great ! Now all is working and finnaly i can use cache on my shop. B) Link to comment Share on other sites More sharing options...
mitsos1os Posted August 17, 2013 Share Posted August 17, 2013 Happy to see that I helped some people! Keep up the good work! 1 Link to comment Share on other sites More sharing options...
caris789 Posted September 27, 2013 Share Posted September 27, 2013 Actually I solved it. I figured out that in the template that I was using, this block came from an overriden permanent links module by the template, which used the same code as user info block module. So since there was something wrong with the cache function of this module, I found the file /modules/blockpermanentlinks.php and saw that when it called the hooks, it called the cached files like this: public function hookFooter($params) { return $this->display(__FILE__, 'blockpermanentlinks-footer.tpl', $this->getCacheId('blockpermanentlinks-footer')); } so what I did was to remove the cache part so it will always call a new instance like this: public function hookFooter($params) { return $this->display(__FILE__, 'blockpermanentlinks-footer.tpl'); } and VOILA!!!! Probably you need to find in your template what module is called and disable this way its cache I tried this, it worked for a few weeks and is back to doing the same thing. Link to comment Share on other sites More sharing options...
mitsos1os Posted September 28, 2013 Share Posted September 28, 2013 If you did this correctly, it can't be gone and then come back.... Maybe you installed an other module that overrides the default one and it has the same problem Link to comment Share on other sites More sharing options...
vekia Posted September 28, 2013 Share Posted September 28, 2013 I tried this, it worked for a few weeks and is back to doing the same thing. maybe you updated this module and downloaded new files ? Link to comment Share on other sites More sharing options...
caris789 Posted October 1, 2013 Share Posted October 1, 2013 maybe you updated this module and downloaded new files ? I don't think so.. I opened the module and everything looked the same with no change. But what I did was to go into my server and I deleted cache/smarty/compile cache/smarty/cache img/tmp my question is, if cache is enabled, is it a good idea to constantly clear this? cos I remember that when I first edited the module, I had to manually clear the cache for the effect to take place as well. Link to comment Share on other sites More sharing options...
caris789 Posted October 1, 2013 Share Posted October 1, 2013 If you did this correctly, it can't be gone and then come back.... Maybe you installed an other module that overrides the default one and it has the same problem Hmmm.. I have installed quite a number of modules trying to get my site to where it is. so I wouldn't even know which of them would be responsible for the over ride. but after manually clearing my cache it worked fine again Link to comment Share on other sites More sharing options...
WalterW Posted November 13, 2013 Share Posted November 13, 2013 public function hookTop($params) { return $this->display(__FILE__, 'blockpermanentlinks-header.tpl'); } I had the same error and removing the cache to footer not solved or erasing the cache, so also modify header line which is where I have the bug and now it works fine, If someone does not work to change the header lines and put up Link to comment Share on other sites More sharing options...
matthewriot Posted January 28, 2014 Share Posted January 28, 2014 yep have had this hapopen on two separate installs of diff versions of prestashop on two diff servers. Presta is a piece of crap when the developers wont respond to some of the most important bugs. THIS IS A BUG. FIX IT PRESTA OR GIVE US A FIX. THIS IS NO WAY TO RUN A COMPANY BY IGNORING EVERY POST ABOUT IT. http://www.prestashop.com/forums/topic/297307-random-customer-names-in-hello-customer-header/ FOR EXAMPLE. Best way we could find was to comment out that part, but its been a few motnhs since I've done it so I cant remember where to go to comment it out! Ahhh! Link to comment Share on other sites More sharing options...
matthewriot Posted January 28, 2014 Share Posted January 28, 2014 This bug is really anoying. My temporary hack was to hide the name... div#header ul#header_links li#header_user_info span { display:none; } I still hope someone will find and post a proper solution. Which file did you put this in? Link to comment Share on other sites More sharing options...
matthewriot Posted January 28, 2014 Share Posted January 28, 2014 PS - removing the cache function from the hookTOP and the other place only caused me major cache errors, trashed my store, made most of the store admin area inaccessible like newsletter and home text editor Link to comment Share on other sites More sharing options...
Anderson Giga Posted April 30, 2015 Share Posted April 30, 2015 I had the same error and removing the cache to footer not solved or erasing the cache, so also modify header line which is where I have the bug and now it works fine, If someone does not work to change the header lines and put up Hi, in what "header lines", can you say please? And, in what file? Thanks a lot.. Link to comment Share on other sites More sharing options...
Anderson Giga Posted April 30, 2015 Share Posted April 30, 2015 I've tried the solutions with blockpermanentlinks in footer and top and nothing worked. Appearing multiple clients, at random, and some appears other currency (I have multiple currencies), and it's not possible to change Some other possible solution? If anyone knows please help me ASAP Thanks a lot Link to comment Share on other sites More sharing options...
Samanta88 Posted May 19, 2015 Share Posted May 19, 2015 thanks caris789 Its properly work..... who don't understand pls try this.. public function hookTop($params) { //return $this->display(__FILE__, 'blockpermanentlinks-header.tpl', $this->getCacheId('blockpermanentlinks-header')); return $this->display(__FILE__, 'blockpermanentlinks-header.tpl'); } Link to comment Share on other sites More sharing options...
ganesh suthar Posted July 19, 2016 Share Posted July 19, 2016 I have same issue. I done this public function hookTop($params) { //return $this->display(__FILE__, 'blockpermanentlinks-header.tpl', $this->getCacheId('blockpermanentlinks-header')); return $this->display(__FILE__, 'blockpermanentlinks-header.tpl'); } It is work when i will delete cache .After some time Again I got same issue as it before Link to comment Share on other sites More sharing options...
BricksDirect Posted October 29, 2016 Share Posted October 29, 2016 Actually I solved it. I figured out that in the template that I was using, this block came from an overriden permanent links module by the template, which used the same code as user info block module. So since there was something wrong with the cache function of this module, I found the file /modules/blockpermanentlinks.php and saw that when it called the hooks, it called the cached files like this: public function hookFooter($params) { return $this->display(__FILE__, 'blockpermanentlinks-footer.tpl', $this->getCacheId('blockpermanentlinks-footer')); } so what I did was to remove the cache part so it will always call a new instance like this: public function hookFooter($params) { return $this->display(__FILE__, 'blockpermanentlinks-footer.tpl'); } and VOILA!!!! Probably you need to find in your template what module is called and disable this way its cache Thank you! It is working fine now! Link to comment Share on other sites More sharing options...
Recommended Posts