Jump to content

Recommended Posts

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

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 by mitsos1os (see edit history)
Link to comment
Share on other sites

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

  • Like 3
Link to comment
Share on other sites

  • 2 months later...

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

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 by tnov (see edit history)
Link to comment
Share on other sites

  • 1 month later...

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

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 

 

  1. cache/smarty/compile
  2. cache/smarty/cache
  3. 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

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

  • 1 month later...
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

  • 2 months later...

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

  • 1 year later...

 

 

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

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

  • 3 weeks later...

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

  • 1 year later...

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

  • 3 months later...

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

×
×
  • Create New...